/**
 * Atelier — Search overlay + autocomplete (C4). Opened from the header
 * "Search" link: a full-width panel dropping from the top of the page
 * with a large input, live suggestion list (product + category groups),
 * and popular-terms shortcuts (reusing the same tag-cloud idea as T39).
 */
.atl-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--atl-overlay-scrim);
  z-index: 65;
  display: none;
}
.atl-search-overlay[data-open] { display: block; }

.atl-search-panel {
  background: var(--atl-bg);
  border-bottom: 1px solid var(--atl-border);
  padding: 32px 48px;
  max-width: 900px;
  margin: 0 auto;
}
.atl-search-form { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--atl-text); padding-bottom: 12px; }
/* input.atl-search-input[type] companion: Magento base styles-m.css styles
   input[type="search"] at (0,1,1) with border/bg/height:32px/padding:0 9px,
   beating the bare class (0,1,0) — the overlay input rendered as a stubby
   grey-bordered box instead of the big borderless field. (0,2,1) wins. */
.atl-search-input,
input.atl-search-input[type] {
  flex: 1;
  border: none;
  background: none;
  height: auto;
  padding: 0;
  font-size: 24px;
  font-family: 'Cormorant Garamond', serif;
  color: var(--atl-text);
  outline: none;
}
.atl-search-input::placeholder { color: var(--atl-text-subtle); }
.atl-search-close { background: none; border: none; font-size: 20px; color: var(--atl-text-muted); cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; font-family: inherit; }
.atl-search-close:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }

.atl-search-section { margin-top: 24px; }
.atl-search-section-title { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--atl-text-muted); margin-bottom: 12px; }

.atl-search-suggestions { display: flex; flex-direction: column; }
.atl-search-suggestion { display: flex; align-items: center; gap: 14px; padding: 10px 0; text-decoration: none; color: var(--atl-text); }
.atl-search-suggestion-media { width: 44px; aspect-ratio: 3/4; background: var(--atl-surface); border: 1px solid var(--atl-border); flex-shrink: 0; }
.atl-search-suggestion-name { font-size: 14px; }
.atl-search-suggestion-price { font-size: 12.5px; color: var(--atl-text-muted); margin-left: auto; }

.atl-search-terms { display: flex; gap: 10px; flex-wrap: wrap; }
.atl-search-term { font-size: 13px; padding: 7px 14px; border: 1px solid var(--atl-border-strong); border-radius: 999px; color: var(--atl-text); text-decoration: none; }
.atl-search-term:focus-visible, .atl-search-suggestion:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 2px; }

@media (max-width: 767px) {
  .atl-search-panel { padding: 20px; }
  .atl-search-input { font-size: 18px; }
}

/* R6-09: native quickSearch suggestions container. The themed overlay had no
   destination element, so the core widget had nowhere to render and type-ahead
   was silently absent. Styled to the overlay, tokens only (no hardcoded hex). */
.atl-search-autocomplete {
    margin-top: 8px;
    background: var(--atl-surface);
    border: 1px solid var(--atl-border);
    max-height: 320px;
    overflow-y: auto;
}
.atl-search-autocomplete:empty { display: none; }
.atl-search-autocomplete ul { list-style: none; margin: 0; padding: 0; }
.atl-search-autocomplete li {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--atl-text);
    border-bottom: 1px solid var(--atl-border);
}
.atl-search-autocomplete li:last-child { border-bottom: 0; }
.atl-search-autocomplete li:hover,
.atl-search-autocomplete li.selected { background: var(--atl-band); }
.atl-search-autocomplete .amount { color: var(--atl-text-subtle); }

/* R6-09b: submit control required by quickSearch (form-mini) init; styled to the
   overlay rather than hidden, so keyboard/a11y users get a real submit target. */
.atl-search-submit {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--atl-border-strong);
    color: var(--atl-text);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 2px;
    cursor: pointer;
}
.atl-search-submit:hover { color: var(--atl-accent); border-bottom-color: var(--atl-accent); }
.atl-search-submit:focus-visible { outline: 2px solid var(--atl-focus-ring); outline-offset: 3px; }
