/* ARTSEOUL — search overlay visual refinements, v5.
   Front-end only. Load after assets/css/style.css.
   All dimensional CSS units: %, em, rem (no px). */

.search-overlay {
  background: #f7f8fa;
  color: #20242a;
}

.search-overlay .search-overlay-content {
  width: 88%;
  max-width: 60rem;
  padding: 5rem 0 5rem;
}

.search-overlay .search-overlay-close {
  top: 1.35rem;
  right: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .6rem;
  font-size: 1.9rem;
  font-weight: 300;
  transition: background .2s ease;
}
.search-overlay .search-overlay-close:hover {
  background: #eceef2;
}

/* 01. Main search input — quiet, compact, consistent */
.search-overlay .search-overlay-searchbar {
  display: flex;
  align-items: center;
  min-height: 4.35rem;
  padding: .45rem 1.05rem;
  border: .0625rem solid #e2e5eb;
  border-radius: .95rem;
  background: var(--white-color-095);
  box-shadow: 0 .25rem 1.1rem rgba(23, 31, 45, .065);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-overlay .search-overlay-searchbar:focus-within {
  border-color: #8c9cad;
  box-shadow: 0 .3rem 1.35rem rgba(23, 31, 45, .09);
}
.search-overlay .search-overlay-searchbar > button {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.75rem;
}
.search-overlay .search-overlay-searchbar svg {
  width: 1.45rem;
  height: 1.45rem;
  stroke: #303944;
  stroke-width: 1.75;
}
.search-overlay .search-overlay-searchbar input {
  flex: 1;
  min-width: 0;
  width: 0;
  height: 3.1rem;
  padding: 0 .5rem;
  font-size: 1.13rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.02em;
  color: #20242a;
}
.search-overlay .search-overlay-searchbar input::placeholder {
  color: #a0a5ad;
  opacity: 1;
}

/* 02. Suggested terms — keep them secondary to the input */
.search-overlay .search-suggestions {
  padding: 1.7rem .15rem 0;
}
.search-overlay .search-suggestions-label {
  margin: 0 0 .8rem;
  color: #777e89;
  font-size: .82rem;
  font-weight: 600;
}
.search-overlay .search-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.search-overlay .search-keyword {
  min-height: 2.35rem;
  padding: .55rem .87rem;
  border: .0625rem solid transparent;
  border-radius: .5rem;
  background: #eceef1;
  color: #3a414a;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.25;
  transition: background .15s ease, border-color .15s ease;
}
.search-overlay .search-keyword:hover,
.search-overlay .search-keyword:focus-visible {
  background: #e0e5eb;
  border-color: #cdd5df;
}

/* 03. Collapsible filter — one coherent panel, no repeated headings */
.search-overlay .search-filter-details {
  display: block;
  height: auto;
  margin: 2.5rem 0 0;
}
.search-overlay .search-filter-details > summary.overlay-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.6rem;
  padding: .85rem 1.45rem;
  border: .0625rem solid #e2e5eb;
  border-radius: .8rem;
  background: var(--white-color-095);
  color: #242b34;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: background .15s ease;
}
.search-overlay .search-filter-details > summary.overlay-filter-summary:hover {
  background: #fbfcfd;
}
.search-overlay .search-filter-details > summary.overlay-filter-summary::after {
  display: none;
}
.search-overlay .search-filter-details[open] > summary.overlay-filter-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--white-color-095);
}
.search-overlay .overlay-filter-chevron {
  color: #687382;
  font-size: .95rem;
  font-weight: 400;
}
.search-overlay .search-filter-details[open] .overlay-filter-chevron {
  transform: rotate(180deg);
}
.search-overlay .search-filter-panel {
  position: static;
  inset: auto;
  z-index: auto;
  max-height: none;
  overflow: visible;
  padding: 1.5rem 1.45rem 1.65rem;
  border: .0625rem solid #e2e5eb;
  border-top: 0;
  border-radius: 0 0 .8rem .8rem;
  background: var(--white-color-095);
  box-shadow: 0 .3rem 1.25rem rgba(23, 31, 45, .025);
}
/* Redundant '작품 상세검색' label adds visual noise; preserve helper text. */
.search-overlay .filter-header {
  display: block;
  margin: 0;
  padding: 0 0 1.35rem;
  border: 0;
}
.search-overlay .filter-header strong {
  display: none;
}
.search-overlay .filter-header span {
  color: #838a94;
  font-size: .8rem;
  font-weight: 400;
}
.search-overlay .filter-groups {
  display: grid;
  grid-template-columns: 50% 50%;
  row-gap: 1.6rem;
  padding: 0;
}
.search-overlay .filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.search-overlay .filter-group:nth-child(odd) {
  padding-right: 1.1rem;
}
.search-overlay .filter-group:nth-child(even) {
  padding-left: 1.1rem;
}
.search-overlay .filter-group legend {
  width: 100%;
  padding: 0 0 .8rem;
  color: #303741;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.4;
}
.search-overlay .filter-range {
  display: flex;
  align-items: center;
  width: 100%;
  gap: .45rem;
}
.search-overlay .filter-range label,
.search-overlay .filter-range > input {
  min-width: 0;
}
.search-overlay .filter-range input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 2.8rem;
  padding: .55rem .7rem;
  border: .0625rem solid #e0e4ea;
  border-radius: .5rem;
  background: #fafbfc;
  color: #303741;
  font-size: .84rem;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.search-overlay .filter-range input:focus {
  border-color: #8796a7;
  background: var(--white-color-095);
}
.search-overlay .filter-range input::placeholder {
  color: #a2a8b1;
}
.search-overlay .filter-range input::-webkit-inner-spin-button,
.search-overlay .filter-range input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.search-overlay .filter-unit,
.search-overlay .range-separator {
  color: #8c949e;
  font-size: .8rem;
}
.search-overlay .size-filters {
  gap: .6rem;
}
.search-overlay .size-filter-row {
  gap: .65rem;
}
.search-overlay .size-filter-row > span {
  flex: 0 0 1.75rem;
  color: #68717c;
  font-size: .79rem;
}
.search-overlay .filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.search-overlay .filter-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: .43rem .75rem;
  border: .0625rem solid #e1e5eb;
  border-radius: .5rem;
  background: #fafbfc;
  color: #4b5563;
  font-size: .8rem;
  line-height: 1.35;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.search-overlay .filter-choice input:checked + span {
  border-color: #273441;
  background: #273441;
  color: var(--white-color-095);
}
.search-overlay .filter-choice:hover input:not(:checked) + span {
  background: #edf0f4;
  border-color: #cfd6de;
}
.search-overlay .filter-actions {
  position: static;
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1.75rem;
  padding: 1.3rem 0 0;
  border-top: .0625rem solid #e8ebf0;
  background: transparent;
}
.search-overlay .filter-reset,
.search-overlay .filter-apply {
  min-height: 2.85rem;
  min-width: 6.5rem;
  padding: .62rem 1.25rem;
  border-radius: .5rem;
  font-size: .84rem;
  font-weight: 600;
}
.search-overlay .filter-reset {
  border-color: #d7dce3;
  background: var(--white-color-095);
  color: #4b5563;
}
.search-overlay .filter-apply {
  border-color: #273441;
  background: #273441;
  color: var(--white-color-095);
}
.search-overlay .filter-apply:hover {
  background: #405062;
}

@media (max-width: 48rem) {
  .search-overlay .search-overlay-content {
    width: 92%;
    padding: 4.5rem 0 3rem;
  }
  .search-overlay .search-overlay-close {
    top: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .search-overlay .search-overlay-searchbar {
    min-height: 3.8rem;
    padding: .35rem .7rem;
    border-radius: .75rem;
  }
  .search-overlay .search-overlay-searchbar svg {
    width: 1.3rem;
    height: 1.3rem;
  }
  .search-overlay .search-overlay-searchbar > button {
    flex-basis: 1.85rem;
    width: 1.85rem;
  }
  .search-overlay .search-overlay-searchbar input {
    height: 2.8rem;
    padding: 0 .45rem;
    font-size: .96rem;
    font-weight: 500;
  }
  .search-overlay .search-suggestions {
    padding: 1.4rem .1rem 0;
  }
  .search-overlay .search-keywords { gap: .45rem; }
  .search-overlay .search-keyword {
    min-height: 2.3rem;
    padding: .52rem .72rem;
    font-size: .8rem;
  }
  .search-overlay .search-filter-details {
    margin: 2rem 0 0;
  }
  .search-overlay .search-filter-details > summary.overlay-filter-summary {
    min-height: 3.3rem;
    padding: .75rem 1rem;
    font-size: .94rem;
  }
  .search-overlay .search-filter-panel {
    padding: 1.15rem 1rem 1.4rem;
  }
  .search-overlay .filter-groups {
    grid-template-columns: 100%;
    row-gap: 1.5rem;
  }
  .search-overlay .filter-group:nth-child(odd),
  .search-overlay .filter-group:nth-child(even) {
    padding: 0;
  }
  .search-overlay .filter-range input {
    height: 2.65rem;
    font-size: .82rem;
  }
  .search-overlay .filter-choice span {
    min-height: 2.35rem;
    padding: .45rem .7rem;
    font-size: .8rem;
  }
  .search-overlay .filter-actions {
    justify-content: stretch;
  }
  .search-overlay .filter-reset,
  .search-overlay .filter-apply {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-overlay *, .search-overlay *::before, .search-overlay *::after {
    transition: none;
  }
}
