.search-tag-launcher {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0;
}

.selected-search-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.selected-search-tag,
.tag-popup-chip {
  cursor: pointer;
}

.selected-search-tag {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: inherit;
}

.tag-popup-backdrop[hidden] {
  display: none;
}

.tag-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.72);
  display: grid;
  place-items: center;
  padding: 20px;
}

.tag-popup-dialog {
  width: min(760px, 96vw);
  max-height: 82vh;
  overflow: auto;
  background: #111;
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.tag-popup-head,
.tag-popup-tools,
.tag-popup-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tag-popup-head {
  align-items: flex-start;
}

.tag-popup-head h2 {
  margin-top: 0;
}

.tag-popup-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.tag-popup-tools {
  margin: 14px 0;
  flex-wrap: wrap;
}

.tag-popup-tools input[type="search"] {
  flex: 1 1 260px;
}

.tag-popup-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0 16px;
}

.tag-popup-chip {
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 8px 12px;
}

.tag-popup-chip span {
  opacity: .7;
  margin-left: 6px;
}

.tag-popup-chip.selected {
  outline: 2px solid currentColor;
  background: rgba(255,255,255,.16);
}

.tag-popup-actions {
  justify-content: flex-end;
}

body.tag-popup-open {
  overflow: hidden;
}

/* STAGE 9.3D8C5L SEARCH LIGHT THEME */
html[data-theme="light"] .tag-popup-dialog {
  background: #ffffff;
  color: var(--h4u-text);
  border: 2px solid var(--h4u-gold);
}
html[data-theme="light"] .tag-popup-chip {
  background: #fff7e8;
  color: #8f0e2a;
  border-color: var(--h4u-gold);
}
html[data-theme="light"] .tag-popup-chip.selected {
  background: #a9102a;
  color: #ffffff;
  outline-color: var(--h4u-gold);
}
html[data-theme="light"] .tag-popup-close {
  color: var(--h4u-text);
}
/* END STAGE 9.3D8C5L */

/* STAGE 9.3D8C5M LIGHT BUTTON CONTRAST */
html[data-theme="light"] #clear-selected-tags {
  background: #fff7e8 !important;
  color: #8f0e2a !important;
  border: 1px solid #d4af37 !important;
}
/* END STAGE 9.3D8C5M */
