/* ARTSEOUL v8 — 입력창과 최근 검색어가 하나의 둥근 흰색 패널
 * 기존 search-v6.css 다음에 불러오기. v7 CSS를 이 파일로 대체.
 * CSS 크기 단위는 %, em, rem만 사용. PHP / 백엔드 변경 없음.
 */

/* 바깥 요소는 원래 검색창의 자리만 차지합니다. */
.search-overlay .search-combobox {
  position: relative;
  z-index: 30;
  width: 100%;
  height: 4.35rem;
}
/* 안쪽 요소 하나가 검색창 + 검색 기록 전체의 테두리, 배경, 그림자를 가집니다. */
.search-overlay .search-combobox-surface {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white-color-095);
  border: .0625rem solid #e3e6e9;
  border-radius: .95rem;
  box-shadow: 0 .3rem 1rem rgba(20, 28, 39, .10);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.search-overlay .search-combobox.is-recent-open .search-combobox-surface {
  border-color: #dee2e7;
  box-shadow: 0 .65rem 1.7rem rgba(20, 28, 39, .14);
}
/* 검색 입력창 자체에는 별도 테두리/그림자가 전혀 없습니다. */
.search-overlay .search-combobox .search-overlay-searchbar,
.search-overlay .search-combobox .search-overlay-searchbar:focus-within {
  width: 100%;
  min-height: 4.225rem;
  flex: 0 0 auto;
  margin: 0;
  padding: .45rem 1.05rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* 검색 목록은 같은 표면의 다음 자식이고 자연스러운 높이로 이어집니다. */
.search-overlay .search-combobox .search-recents {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 .55rem;
  border: 0;
  border-top: .0625rem solid #eceef1;
  border-radius: 0;
  background: var(--white-color-095);
  box-shadow: none;
  overflow: hidden;
}
.search-overlay .search-combobox .search-recents[hidden] { display: none !important; }
.search-overlay .search-recents-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 1rem 1.25rem .4rem;
  gap: 1rem;
}
.search-overlay .search-recents-heading h2 {
  margin: 0;
  color: #202328;
  font-size: .96rem;
  font-weight: 700;
}
.search-overlay .search-recents-clear {
  border: 0;
  padding: .35rem .15rem;
  color: #8a8e96;
  background: none;
  text-decoration: none;
  font-size: .8rem;
}
.search-overlay .search-recents-clear:hover { text-decoration: underline; color: #242b35; }
.search-overlay .search-recent-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  max-height: 25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-overlay .search-recent-item {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  gap: .3rem;
  margin: 0;
  padding: 0 .8rem 0 1.1rem;
  border: 0;
  border-radius: 0;
  background: var(--white-color-095);
  overflow: visible;
}
.search-overlay .search-recent-item:hover { background: #f5f6f8; }
.search-overlay .search-recent-term {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: .8rem;
  width: 0;
  min-width: 0;
  max-width: none;
  min-height: 3rem;
  padding: .55rem .3rem;
  border: 0;
  background: transparent;
  color: #24272c;
  font-size: .91rem;
  font-weight: 400;
  text-align: left;
}
.search-overlay .search-recent-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* 시계 아이콘은 인라인 SVG이며 외부 에셋은 사용하지 않습니다. */
.search-overlay .search-recent-clock {
  position: relative;
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #f4f5f6;
}
.search-overlay .search-recent-clock svg {
  display: block;
  position: absolute;
  top: 23%;
  left: 23%;
  width: 54%;
  height: 54%;
  color: #90959c;
}
.search-overlay .search-recent-remove {
  display: grid;
  place-items: center;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  min-height: 2.8rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9298a0;
  font-size: 1.15rem;
  line-height: 1;
}
.search-overlay .search-recent-term:hover,
.search-overlay .search-recent-remove:hover { background: transparent; }
.search-overlay .search-recent-remove:hover { color: #242b35; }
.search-overlay .search-recent-empty {
  padding: 1rem 1.3rem 1.4rem;
  color: #9298a0;
  font-size: .88rem;
}

@media (max-width: 48rem) {
  .search-overlay .search-combobox { height: 3.8rem; }
  .search-overlay .search-combobox-surface { border-radius: .8rem; }
  .search-overlay .search-combobox .search-overlay-searchbar,
  .search-overlay .search-combobox .search-overlay-searchbar:focus-within {
    min-height: 3.675rem;
    padding: .35rem .7rem;
  }
  .search-overlay .search-recents-heading { padding: .8rem .95rem .3rem; }
  .search-overlay .search-recents-heading h2 { font-size: .91rem; }
  .search-overlay .search-recent-list { max-height: 16rem; }
  .search-overlay .search-recent-item { padding: 0 .5rem 0 .6rem; }
  .search-overlay .search-recent-term { gap: .6rem; min-height: 2.8rem; font-size: .87rem; }
  .search-overlay .search-recent-remove { min-height: 2.8rem; flex-basis: 2.2rem; }
}
