/* =====================================================================
   SKI FINDER — the ski landing's search, in the hero.

   A wide glass bar — a white field set in a frosted frame — with a search
   glyph, a hint that types out skiing options, and a gold button. Under it a
   white panel: before typing, a mega menu of everything skiing; while typing,
   grouped live results with photos, prices and the matched words marked.

   Kohwan's navy, gold and type (the ski pages' --skl-* tokens, with plain
   fallbacks). Prefix .skf- throughout.
   ===================================================================== */
.skl-hero--search { overflow: visible; z-index: 20; }

.skf {
  --f-navy: var(--skl-navy, #2e4755);
  --f-gold: var(--skl-gold, #BD830D);
  --f-gold-2: #a8740b;
  --f-ink: var(--skl-ink, #1f3441);
  --f-muted: var(--skl-muted, #5f7380);
  --f-line: #E6ECEF;
  --f-soft: #F4F7F8;
  --f-head: var(--skl-head, 'Barlow Condensed', 'Oswald', system-ui, sans-serif);
  --f-ease: cubic-bezier(.22, .61, .36, 1);

  position: relative;
  z-index: 30;
  width: min(900px, 100%);
  margin: clamp(22px, 3vw, 36px) auto 0;
  text-align: left;
}

/* ------------------------------ the bar ------------------------------ */
.skf__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 72px;
  padding: 8px 8px 8px 22px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
          backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .16),
    0 24px 60px rgba(12, 22, 30, .35);
  transition: box-shadow .3s var(--f-ease), border-color .3s var(--f-ease);
}
.skf.is-open .skf__bar,
.skf__bar:focus-within {
  border-color: #FFFFFF;
  box-shadow:
    0 0 0 6px rgba(189, 131, 13, .28),
    0 24px 60px rgba(12, 22, 30, .38);
}
.skf__ic { flex: none; width: 24px; height: 24px; color: var(--f-navy); }
.skf__ic svg { width: 100%; height: 100%; }

.skf__field { position: relative; flex: 1; min-width: 0; height: 100%; }
.skf__input {
  width: 100%;
  height: 100%;
  padding: 0 8px 0 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--f-ink);
  outline: none;
  -webkit-appearance: none;
          appearance: none;
}
.skf__input::-webkit-search-cancel-button { display: none; }
/* the real placeholder only shows when the typed hint cannot */
.skf--js .skf__input::placeholder { color: transparent; }

.skf__hint {
  position: absolute;
  left: 10px;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  white-space: nowrap;
  transform: translateY(-50%);
  font-size: 1.12rem;
  color: #8B9BA4;
  pointer-events: none;
}
.skf:not(.skf--js) .skf__hint,
.skf.has-value .skf__hint { display: none; }
.skf__hint-text { color: var(--f-navy); font-weight: 600; }
.skf__caret {
  width: 2px;
  height: 1.2em;
  margin-left: -3px;
  background: var(--f-gold);
  animation: skf-blink 1s steps(1) infinite;
}
@keyframes skf-blink { 50% { opacity: 0; } }

.skf__clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--f-soft);
  color: var(--f-muted);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.skf__clear[hidden] { display: none; }
.skf__clear svg { width: 16px; height: 16px; }
.skf__clear:hover { background: #E6ECEF; color: var(--f-ink); }

.skf__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  background: var(--f-gold);
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s, transform .2s var(--f-ease), box-shadow .2s;
}
.skf__go svg { width: 18px; height: 18px; transition: transform .25s var(--f-ease); }
.skf__go:hover { background: var(--f-gold-2); box-shadow: 0 10px 22px rgba(189, 131, 13, .35); }
.skf__go:hover svg { transform: translateX(3px); }
.skf__go:focus-visible { outline: 2px solid var(--f-navy); outline-offset: 2px; }

/* ------------------------------ the panel ------------------------------ */
.skf__panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--f-line);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 30px 70px rgba(12, 22, 30, .28);
  color: var(--f-ink);
  transform-origin: top center;
  animation: skf-drop .28s var(--f-ease);
}
.skf__panel[hidden] { display: none; }
@keyframes skf-drop { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- the mega menu ---- */
.skf__menu { max-height: min(62vh, 560px); overflow-y: auto; }
.skf__menu[hidden] { display: none; }
.skf__popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--f-line);
  background: var(--f-soft);
}
.skf__popular-lab {
  margin-right: 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--f-gold);
}
.skf__chip {
  padding: 7px 14px;
  border: 1px solid var(--f-line);
  border-radius: 999px;
  background: #FFFFFF;
  font: inherit;
  font-size: .84rem;
  font-weight: 500;
  color: var(--f-ink);
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.skf__chip:hover { border-color: var(--f-gold); color: var(--f-gold); }

.skf__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 26px;
  padding: 18px 22px 8px;
}
.skf__col { min-width: 0; padding-bottom: 12px; }
.skf__col-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  font-family: var(--f-head);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--f-navy);
}
.skf__col-h i {
  margin-left: auto;
  font-family: inherit;
  font-style: normal;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--f-muted);
}
.skf__col-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; color: var(--f-gold); }
.skf__col-ic svg { width: 20px; height: 20px; }
.skf__col ul { margin: 0; padding: 0 0 0 35px; list-style: none; }
.skf__link {
  display: block;
  overflow: hidden;
  padding: 5px 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .88rem;
  color: var(--f-ink);
  text-decoration: none;
  transition: color .2s, padding-left .2s var(--f-ease);
}
.skf__link:hover,
.skf__link.is-active { color: var(--f-gold); padding-left: 4px; }
.skf__more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 3px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  color: var(--f-gold);
  cursor: pointer;
}
.skf__more svg { width: 13px; height: 13px; }
.skf__more:hover { color: var(--f-navy); }

/* ---- the results ---- */
.skf__results { max-height: min(62vh, 560px); overflow-y: auto; padding: 8px 0; }
.skf__results[hidden] { display: none; }
.skf__count { margin: 6px 22px 4px; font-size: .78rem; color: var(--f-muted); }
.skf__count b { color: var(--f-ink); }
.skf__group { padding: 6px 12px 4px; }
.skf__group + .skf__group { border-top: 1px solid var(--f-line); }
.skf__group-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 10px 4px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--f-muted);
}
.skf__group-h svg { width: 15px; height: 15px; color: var(--f-gold); }
.skf__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--f-ink);
  text-decoration: none;
  transition: background-color .15s;
}
.skf__row:hover,
.skf__row.is-active { background: var(--f-soft); }
.skf__row.is-active { box-shadow: inset 3px 0 0 var(--f-gold); }
.skf__thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 10px;
  background: #EAF0F2;
  color: var(--f-navy);
}
.skf__thumb img { width: 100%; height: 100%; object-fit: cover; }
.skf__thumb svg { width: 22px; height: 22px; }
.skf__row-t { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .95rem; font-weight: 600; }
.skf__row-s { display: block; overflow: hidden; margin-top: 2px; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem; color: var(--f-muted); }
.skf__row mark { padding: 0 1px; border-radius: 3px; background: rgba(189, 131, 13, .18); color: inherit; }
.skf__row-p { font-size: .85rem; font-weight: 700; white-space: nowrap; color: var(--f-navy); }
.skf__row-go { width: 16px; height: 16px; color: var(--f-muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--f-ease); }
.skf__row:hover .skf__row-go,
.skf__row.is-active .skf__row-go { opacity: 1; transform: none; }
.skf__row-end { display: flex; align-items: center; gap: 10px; }

.skf__empty { padding: 30px 22px; text-align: center; }
.skf__empty b { display: block; font-family: var(--f-head); font-size: 1.4rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--f-navy); }
.skf__empty p { margin: 6px 0 16px; font-size: .9rem; color: var(--f-muted); }
.skf__empty a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--f-gold);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #FFFFFF;
  text-decoration: none;
}
.skf__empty a svg { flex: none; width: 16px; height: 16px; }

.skf__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0;
  padding: 12px 22px;
  border-top: 1px solid var(--f-line);
  background: var(--f-soft);
  font-size: .78rem;
  color: var(--f-muted);
}
.skf__foot kbd {
  display: inline-block;
  min-width: 20px;
  margin-right: 3px;
  padding: 1px 5px;
  border: 1px solid var(--f-line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #FFFFFF;
  font: inherit;
  font-size: .72rem;
  text-align: center;
  color: var(--f-ink);
}
.skf__foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--f-gold); text-decoration: none; }
.skf__foot a svg { width: 14px; height: 14px; }
.skf__foot a:hover { color: var(--f-navy); }

/* ----------------------------- smaller screens ----------------------------- */
/* Phones and tablets: the popular searches are one row that slides sideways
   instead of wrapping into a tall block. The label stays put at the left and
   the chips pass under it; the fade on the right says there is more. */
@media (max-width: 1099px) {
  .skf__popular {
    flex-wrap: nowrap;
    padding: 12px 16px 12px 0;   /* the label carries the left inset, so nothing shows beside it */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  .skf__popular::-webkit-scrollbar { display: none; }
  .skf__popular-lab {
    position: sticky;
    left: 0;
    z-index: 1;
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    margin: -12px 6px -12px 0;
    padding: 0 10px 0 16px;
    background: var(--f-soft);
  }
  /* A short fade off the label's right edge, inside the gap before the first
     chip, so chips slide softly under it without their own edge being hidden. */
  .skf__popular-lab::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 12px;
    background: linear-gradient(90deg, var(--f-soft), transparent);
    pointer-events: none;
  }
  .skf__chip { flex: 0 0 auto; white-space: nowrap; }
  .skf__popular::after { content: ""; flex: 0 0 24px; }   /* room past the last chip, clear of the fade */
}
@media (max-width: 860px) {
  .skf__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .skf__bar { height: 60px; padding: 6px 6px 6px 16px; border-radius: 16px; }
  .skf__input, .skf__hint { font-size: 1rem; }
  .skf__hint-lead { display: none; }
  .skf__go { width: 48px; padding: 0; justify-content: center; border-radius: 12px; }
  .skf__go span { display: none; }
  .skf__cols { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 4px; }
  .skf__foot > span { display: none; }
  .skf__row { grid-template-columns: 42px minmax(0, 1fr); }
  .skf__thumb { width: 42px; height: 42px; }
  .skf__row-end { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .skf__panel { animation: none; }
  .skf__caret { animation: none; }
}
