/* ==========================================================================
   SESSAIA STUDIO | Quiet-Luxury Borderless Live Search Drawer / Modal
   ========================================================================== */

#search-modal-overlay {
  background-color: rgba(44, 57, 69, 0.20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.5rem;
  z-index: 1000;
}

.search-modal {
  background-color: var(--color-chalk); /* #F9F8F6 Crisp Chalk neutral canvas */
  width: 100%;
  max-width: 720px;
  border-radius: 0;
  box-shadow: none;
  border: none;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 85vh;
  position: relative;
  box-sizing: border-box;
}

/* Minimalist Baseline Search Input */
.search-modal-header {
  position: relative;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #E5E3DD;
  transition: border-color var(--duration-fast) var(--ease-atelier);
  padding-bottom: 0.5rem;
}

.search-input-wrapper:focus-within {
  border-bottom-color: var(--color-slate-ink); /* #2C3945 */
}

.search-field {
  flex: 1;
  width: 100%;
  padding: 0.5rem 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
  font-family: 'Cormorant Garamond', Garamond, 'Georgia', serif;
  font-size: clamp(1.15rem, 2vw, 1.28rem); /* 18px-20px */
  font-weight: 400;
  color: var(--color-slate-ink);
  outline: none;
  box-shadow: none;
}

.search-field::placeholder {
  color: var(--color-pebble-grey); /* #A2A19E */
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.search-close-trigger {
  background: transparent;
  border: none;
  padding: 0.35rem 0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-pebble-grey);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-atelier);
  display: inline-flex;
  align-items: center;
}

.search-close-trigger:hover {
  color: var(--color-slate-ink);
}

/* De-boxed Open Editorial Search Results */
.search-results-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 460px;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #E5E3DD transparent;
}

.search-results-list::-webkit-scrollbar {
  width: 3px;
}

.search-results-list::-webkit-scrollbar-track {
  background: transparent;
}

.search-results-list::-webkit-scrollbar-thumb {
  background: #E5E3DD;
  border-radius: 2px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 0.6rem;
  border-radius: 0;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #E5E3DD;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 200ms ease, padding-left 200ms ease;
}

.search-result-item:hover {
  background-color: rgba(242, 241, 237, 0.6);
  padding-left: 0.85rem;
}

/* Borderless Image Thumbnail */
.search-result-thumb {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 0;
  background-color: transparent;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  flex-shrink: 0;
}

/* Details Middle Column */
.search-result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.search-result-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-slate-ink);
  line-height: 1.35;
  margin: 0;
}

.search-result-materials,
.search-result-meta {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-pebble-grey); /* #A2A19E */
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Far-Right Aligned Price */
.search-result-price {
  font-family: 'Cormorant Garamond', Garamond, 'Georgia', serif;
  font-size: 1.05rem; /* ~15px-16px */
  font-weight: 400;
  color: var(--color-slate-ink); /* #2C3945 */
  white-space: nowrap;
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}

/* Empty State */
.search-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-slate-ink);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.6;
}

/* Pre-Launch Exhibition Mode: Temporarily Hide Prices in Search until Launch */
body.is-pre-launch .search-result-price,
.is-pre-launch .search-result-price {
  display: none !important;
}

@media (max-width: 600px) {
  .search-modal {
    padding: 1.5rem 1.25rem;
  }
  
  .search-result-thumb {
    width: 48px;
    height: 60px;
  }

  .search-result-title {
    font-size: 0.76rem;
  }

  .search-result-materials,
  .search-result-meta {
    white-space: normal;
    font-size: 9.5px;
  }
}
