/* wavepurple -- station picker styles.  Load LAST (after every other stylesheet).
   1) Phones: the picker is a floating panel over the page (page logo visible above, radio skin + Browse button below),
      positioned by mobile-skin-bridge.js. Left/right gap: --wp-sheet-side.
   2) Phones: floating share buttons are hidden while the picker is open (done in mobile-skin-bridge.js).
   3) All sizes: the search box stands out and sweeps a soft light every ~3.5s until something is typed. */


/* ---------- 3) search box: distinct + moving glow ---------- */
.search-row {
  overflow: hidden;
  background: linear-gradient(180deg, #34236a, #281a4d);
  border: 1px solid rgba(167, 139, 250, 0.8);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 0 14px rgba(139, 92, 246, 0.35);
}
.search-row .search-icon { color: var(--amber-500); }
#searchInput::placeholder { color: var(--text-mid); }

.search-row::after {
  content: "";
  display: none;
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14) 42%, rgba(217, 164, 65, 0.30) 58%, transparent);
  transform: translateX(-130%) skewX(-20deg);
}
/* animate only while the box is empty (placeholder showing): typing stops it, clearing restarts it */
.search-row:has(#searchInput:placeholder-shown) {
  animation: wpSearchPulse 3.5s ease-in-out infinite;
}
.search-row:has(#searchInput:placeholder-shown)::after {
  display: block;
  animation: wpSearchSweep 3.5s ease-in-out infinite;
}
@keyframes wpSearchSweep {
  0%        { transform: translateX(-130%) skewX(-20deg); }
  40%, 100% { transform: translateX(330%) skewX(-20deg); }
}
@keyframes wpSearchPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 0 12px rgba(139, 92, 246, 0.30); border-color: rgba(167, 139, 250, 0.7); }
  18%      { box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.55), 0 0 22px rgba(217, 164, 65, 0.45); border-color: rgba(217, 164, 65, 0.95); }
  45%      { box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 0 12px rgba(139, 92, 246, 0.30); border-color: rgba(167, 139, 250, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .search-row:has(#searchInput:placeholder-shown) { animation: none; }
  .search-row:has(#searchInput:placeholder-shown)::after { display: none; animation: none; }
}

/* ---------- 1) + 2) phones ---------- */
.wp-dock-hide { display: none !important; }   /* floating share buttons, hidden while the picker is open */

@media (max-width: 899px) {
  /* The picker is a floating panel with the page visible around it: the top of the page logo above,
     the bottom of the radio skin with the Browse button below. mobile-skin-bridge.js measures
     the page each time the picker opens and sets --wp-sheet-top / --wp-sheet-bottom (fallbacks below).
     TUNING KNOB: --wp-sheet-side = space left and right of the panel. */
  :root { --wp-sheet-side: 14px; }

  .content-col {
    inset: var(--wp-sheet-top, 150px) var(--wp-sheet-side) var(--wp-sheet-bottom, 90px) var(--wp-sheet-side);
    padding: 0 8px 12px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    overscroll-behavior: contain;
    /* closed: fully off-screen and not clickable (the panel no longer starts at the screen edge) */
    transform: translateY(calc(100% + 100vh));
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  body.stations-open .content-col {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
  }

  /* dim the page around the panel; tapping the dimmed page closes the picker */
  body.stations-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(12, 7, 24, 0.55);
  }

  .mobile-picker-header { padding-top: 12px; padding-bottom: 8px; margin-bottom: 6px; border-radius: 18px 18px 0 0; }
  .content-col .search-row { margin-top: 2px !important; margin-bottom: 8px !important; }
  .content-col .station-panel { padding-top: 4px; padding-bottom: 24px; }
  .category-list { gap: 8px; }
  .category-head { padding-top: 12px; padding-bottom: 12px; }
  .station-row { padding-top: 8px; padding-bottom: 8px; }
}
