/* KIRO Search dropdown (design: theme-notev/design/part1/designs/Search-desktop / Search-mobile).
 * Uses the theme's tokens (theme-notev/assets/tokens.css) with the design's values as fallbacks, and logical
 * properties only, so it works LTR and RTL. Unlayered on purpose: the theme's rules live in @layer components. */

.ks-form { position: relative; }
.ks-form .ks-clear { inline-size: 40px; flex: none; color: var(--ink-muted, #5a5f63); font: inherit; font-size: 16px; }
.ks-form .ks-clear[hidden] { display: none; }
.ks-form input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }

.ks-panel {
  position: absolute; z-index: 60; inset-block-start: calc(100% + 12px); inset-inline-start: 0;
  inline-size: min(880px, calc(100vw - 32px)); box-sizing: border-box; max-block-size: calc(100vh - 200px); overflow-y: auto;
  background: var(--surface, #fff); color: var(--ink, #17191a); border-radius: var(--radius-md, 4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24); font: var(--type-body, 400 16px/26px Heebo, Arial, sans-serif); text-align: start;
}
.site-header .ks-panel { inset-inline-start: -120px; }
.ks-panel[hidden], .ks-sheet[hidden], .ks-sheet-foot[hidden] { display: none; }
/* The panel sits inside the theme's form, whose `.header-search button` rule sizes every button as a 48px icon. */
.ks-form .ks-panel button { inline-size: auto; block-size: auto; min-inline-size: 0; justify-content: flex-start; }
.ks-form .ks-panel .ks-chip { display: inline-flex; align-items: center; block-size: 36px; border: 1px solid var(--line-control, #8d9196); background: var(--surface, #fff); }
.ks-form .ks-panel .ks-row { min-block-size: 40px; }
.ks-form .ks-panel .ks-link { display: inline; }
.ks-panel a, .ks-sheet a { color: var(--ink, #17191a); text-decoration: none; }
.ks-panel button, .ks-sheet button { font: inherit; color: inherit; cursor: pointer; }

.ks-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: var(--type-label, 600 13px/16px sans-serif); color: var(--ink-muted, #5a5f63); padding-block: 4px; }
.ks-muted { color: var(--ink-muted, #5a5f63); font-size: 13px; }
.ks-link { border: 0; background: transparent; padding: 0; font-size: 13px !important; text-decoration: underline; color: var(--ink, #17191a) !important; }
.ks-group { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }

.ks-row {
  display: flex; align-items: center; gap: 8px; min-block-size: 40px; padding: 0 6px; margin: 0 -6px;
  border: 0; border-radius: var(--radius-sm, 2px); background: transparent; text-align: start; font-size: 15px;
}
.ks-row svg { flex: none; color: var(--ink-muted, #5a5f63); }
.ks-cat { justify-content: space-between; }
.ks-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-chip {
  block-size: 36px; padding: 0 14px; border-radius: var(--radius-pill, 999px); border: 1px solid var(--line-control, #8d9196);
  background: var(--surface, #fff); font-size: 14px !important; font-weight: 600; white-space: nowrap; flex: none;
}
.ks-row:hover, .ks-product:hover, .ks-row.is-active, .ks-product.is-active, .ks-all.is-active, .ks-all:hover { background: var(--surface-sunken, #f1f0ec); }
.ks-chip:hover, .ks-chip.is-active { border-color: var(--ink, #17191a); }
.ks-panel [data-ks-opt]:focus-visible, .ks-sheet [data-ks-opt]:focus-visible, .ks-chip.is-active, .ks-finder.is-active {
  outline: 2px solid var(--ink, #17191a); outline-offset: 2px;
}

/* empty field: recent + popular + sight finder */
.ks-empty { display: flex; gap: 32px; padding: 24px; }
.ks-empty > .ks-group { flex: 1 1 0; }
.ks-finder {
  flex: 0 0 300px; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius-md, 4px);
  background: var(--surface-inverse, #000) !important; color: var(--on-inverse, #fff) !important; align-self: flex-start;
}
.ks-finder-kicker { font: var(--type-label, 600 13px/16px sans-serif); color: var(--brand-yellow, #fbcc12); }
.ks-finder-title { font-size: 17px; line-height: 24px; font-weight: 600; }

/* typed query: suggestions + categories | products */
.ks-hits.has-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.ks-side { padding: 20px; border-inline-end: 1px solid var(--line-divider, #dcdbd6); display: flex; flex-direction: column; gap: 18px; }
.ks-main { padding: 12px 12px 0; display: flex; flex-direction: column; }
.ks-main > .ks-head { padding: 8px 8px 4px; }
.ks-product { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: var(--radius-sm, 2px); }
.ks-thumb { inline-size: 56px; block-size: 56px; flex: none; border-radius: var(--radius-sm, 2px); background: var(--surface-sunken, #f1f0ec); overflow: hidden; }
.ks-thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ks-pmain { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; }
.ks-pname { font-size: 16px; line-height: 22px; font-weight: 400; }
.ks-pname b { font-weight: 700; }
.ks-pspec { font-size: 13px; line-height: 18px; color: var(--ink-muted, #5a5f63); }
.ks-pside { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.ks-price { font-size: 16px; line-height: 22px; font-weight: 700; white-space: nowrap; }
.ks-stock { font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.ks-stock.is-in { color: var(--in-stock, #1d6b40); }
.ks-stock.is-out, .ks-stock.is-back { color: var(--ink-muted, #5a5f63); }
.ks-all {
  margin: 8px -12px 0; padding: 14px 20px; border-block-start: 1px solid var(--line-divider, #dcdbd6);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; font-weight: 700;
}

/* no results / engine down */
.ks-none { padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ks-none p { margin: 0; }
.ks-none-title { font: var(--type-heading-2, 600 20px/28px sans-serif); font-weight: 700; }
.ks-none .ks-muted { font-size: 16px; }
.ks-wa { font-weight: 600; text-decoration: underline !important; }
.ks-fallback { padding: 12px 18px; }

/* desktop: dim the page under the header */
.ks-scrim { position: fixed; z-index: 45; inset-inline: 0; inset-block-end: 0; background: rgba(0, 0, 0, 0.6); display: none; }
.ks-scrim.is-on { display: block; }
@media (max-width: 63.99rem) { .ks-scrim, .ks-form > .ks-panel { display: none !important; } }

/* mobile: full-screen dialog */
html.ks-lock, html.ks-lock body { overflow: hidden; }
.ks-sheet {
  position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; background: var(--surface, #fff); color: var(--ink, #17191a);
  font: var(--type-body, 400 16px/26px Heebo, Arial, sans-serif); text-align: start;
}
.ks-sheet-bar { flex: none; display: flex; align-items: center; gap: 8px; padding-block: 10px; padding-inline: 16px 8px; background: var(--surface-inverse, #000); }
.ks-sheet-form {
  flex: 1; min-inline-size: 0; display: flex; align-items: center; block-size: 44px; box-sizing: border-box; padding-inline-start: 12px;
  background: var(--surface, #fff); border-radius: var(--radius-sm, 2px); outline: 2px solid var(--brand-yellow, #fbcc12); outline-offset: 2px;
}
.ks-sheet-form input[type=search] { flex: 1; min-inline-size: 0; block-size: 42px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink, #17191a); outline: none; }
.ks-sheet-form input[type=search]::-webkit-search-cancel-button { display: none; }
.ks-sheet-form .ks-clear { block-size: 42px; border: 0; background: transparent; }
.ks-cancel { flex: none; min-block-size: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--on-inverse, #fff) !important; font-size: 15px !important; font-weight: 600; }
.ks-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.ks-sheet .ks-empty { flex-direction: column; gap: 20px; padding: 16px; }
.ks-sheet .ks-recent { min-block-size: 48px; margin: 0; padding: 0; border-block-end: 1px solid var(--line-divider, #dcdbd6); border-radius: 0; gap: 10px; font-size: 16px; }
.ks-sheet .ks-chip { block-size: 40px; }
.ks-sheet .ks-finder { flex: none; align-self: stretch; }
.ks-sheet .ks-finder-title { font-size: 16px; }
.ks-sheet .ks-hits { padding: 8px 16px 0; display: flex; flex-direction: column; }
.ks-catchips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; }
.ks-catchip { flex: none; display: inline-flex; align-items: center; block-size: 36px; padding: 0 12px; border-radius: var(--radius-pill, 999px); background: var(--surface-sunken, #f1f0ec); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ks-sheet .ks-product { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "t m" "t s"; column-gap: 12px; align-items: start; padding: 10px 0; border-radius: 0; border-block-end: 1px solid var(--line-divider, #dcdbd6); }
.ks-sheet .ks-thumb { grid-area: t; }
.ks-sheet .ks-pmain { grid-area: m; }
.ks-sheet .ks-pside { grid-area: s; flex-direction: row; align-items: baseline; gap: 8px; }
.ks-sheet .ks-pname { font-size: 15px; line-height: 20px; }
.ks-sheet .ks-pspec { font-size: 12px; line-height: 16px; }
.ks-sheet .ks-price { font-size: 15px; }
.ks-sheet .ks-none { padding: 24px 16px; gap: 12px; }
.ks-sheet .ks-none-title { font-size: 18px; line-height: 26px; }
.ks-sheet .ks-none .ks-muted { font-size: 14px; }
.ks-sheet-foot { flex: none; padding: 12px 16px 20px; border-block-start: 1px solid var(--line-divider, #dcdbd6); }
.ks-all-btn { display: flex; align-items: center; justify-content: center; block-size: 48px; border: 1px solid var(--ink, #17191a); border-radius: var(--radius-md, 4px); font-size: 15px; font-weight: 700; }
.ks-all-btn.is-active { background: var(--surface-sunken, #f1f0ec); }
@media (prefers-reduced-motion: no-preference) { .ks-panel { animation: ks-in 0.12s ease-out; } }
@keyframes ks-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
