/* Explore search: right-rail launcher + dark glass side panel (radar data tag rows). */
.explore-search-dock {
  --explore-search-width: min(332px, calc(100vw - 24px));
  --explore-rail-size: 44px;
  --explore-panel-width: min(340px, calc(100vw - 80px));
  --explore-accent: #ffdf5a;
  --explore-surface: rgba(12, 16, 24, 0.94);
  --explore-line: rgba(255, 255, 255, 0.12);
  --explore-text: rgba(236, 241, 248, 0.96);
  --explore-muted: rgba(184, 196, 214, 0.86);
  --explore-faint: rgba(150, 164, 186, 0.78);
  position: absolute;
  top: 120px;
  right: 12px;
  width: var(--explore-search-width);
  z-index: 1306;
  pointer-events: none;
  overflow: visible;
}
.explore-search-dock[hidden] { display: none !important; }
.explore-search-dock.is-collapsed { width: 44px; }
.explore-search-dock button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  font: inherit;
  box-sizing: border-box;
  cursor: pointer;
}
.explore-search-dock button:focus-visible {
  outline: 2px solid var(--explore-accent);
  outline-offset: 2px;
}

/* Rail: launcher and "hide other planes" stay visible next to the panel. */
.explore-search-launcher-btn,
.explore-hide-other-planes-btn {
  position: absolute;
  right: 0;
  width: var(--explore-rail-size);
  height: var(--explore-rail-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--explore-line);
  border-radius: 999px;
  background: var(--explore-surface);
  color: var(--explore-text);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.explore-search-launcher-btn { top: 0; }
.explore-hide-other-planes-btn { top: calc(var(--explore-rail-size) + 8px); }
.explore-search-dock.is-rail-above-launcher .explore-hide-other-planes-btn { top: calc(-1 * (var(--explore-rail-size) + 8px)); }
.explore-search-launcher-btn:hover,
.explore-hide-other-planes-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(24, 30, 42, 0.96);
}
.explore-search-launcher-btn[aria-expanded="true"],
.explore-hide-other-planes-btn.is-active {
  color: var(--explore-accent);
  border-color: rgba(255, 223, 90, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 223, 90, 0.22), 0 6px 16px rgba(0, 0, 0, 0.32);
}
.explore-search-launcher-core,
.explore-hide-other-planes-core {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Panel */
.explore-search-shell {
  position: absolute;
  top: 8px;
  right: calc(var(--explore-rail-size) + 8px);
  width: var(--explore-panel-width);
  max-height: calc(100% - 8px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--explore-line);
  border-radius: 12px;
  background: var(--explore-surface);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.22);
  color: var(--explore-text);
  overflow: hidden;
  contain: layout paint;
  pointer-events: auto;
  transition: opacity 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.explore-search-dock.is-collapsed .explore-search-shell {
  opacity: 0;
  transform: translateX(8px);
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
.explore-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px 8px 14px;
}
.explore-search-head-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.explore-search-headline-row {
  display: flex;
  flex: 0 0 auto;
}
.explore-search-eyebrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.explore-search-head-tag { display: none; }
.explore-search-count {
  min-width: 0;
  font-size: 12px;
  color: var(--explore-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-search-collapse-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--explore-muted);
}
.explore-search-collapse-btn:hover,
.explore-search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--explore-text);
}
.explore-search-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 0 10px 10px;
}
.explore-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0 2px;
  padding: 0 5px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.explore-search-input-wrap:focus-within {
  border-color: rgba(255, 223, 90, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 223, 90, 0.3);
}
.explore-search-input-icon {
  display: inline-flex;
  color: var(--explore-faint);
}
.explore-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--explore-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}
.explore-search-input::placeholder { color: rgba(170, 182, 200, 0.62); }
.explore-search-clear-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--explore-muted);
}
.explore-search-clear-btn[disabled] { visibility: hidden; }
.explore-search-status {
  flex: 0 0 auto;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--explore-faint);
}
.explore-search-status.is-empty { color: rgba(255, 196, 196, 0.9); }

/* Results: listbox of two-line data tags */
.explore-search-results {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.explore-search-results:empty { display: none; }
.explore-search-results::before,
.explore-search-results::after {
  content: "";
  position: sticky;
  display: block;
  flex: 0 0 auto;
  height: 14px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.explore-search-results::before {
  top: 0;
  margin-bottom: -14px;
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.96), rgba(12, 16, 24, 0));
}
.explore-search-results::after {
  bottom: 0;
  margin-top: -14px;
  background: linear-gradient(0deg, rgba(12, 16, 24, 0.96), rgba(12, 16, 24, 0));
}
.explore-search-results.has-scroll-top::before,
.explore-search-results.has-scroll-bottom::after { opacity: 1; }
.explore-search-result-btn {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 10px 7px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--explore-text);
  text-align: left;
  line-height: 1.25;
  transition: background-color 0.12s ease;
}
.explore-search-result-btn::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 2px;
  background: transparent;
}
.explore-search-result-btn:hover { background: rgba(255, 255, 255, 0.05); }
.explore-search-result-btn.is-selected { background: rgba(255, 223, 90, 0.06); }
.explore-search-result-btn.is-selected::before { background: var(--explore-accent); }
.explore-search-result-btn.is-active {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 223, 90, 0.5);
}
.explore-search-dock .explore-search-result-btn:focus-visible { outline-offset: -2px; }
.explore-search-result-btn [hidden] { display: none !important; }
.explore-search-result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.explore-search-result-ident,
.explore-search-result-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
}
.explore-search-result-callsign {
  flex: 0 1 auto;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.explore-search-result-pilot {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--explore-muted);
}
.explore-search-result-live {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(226, 234, 244, 0.92);
  white-space: nowrap;
}
.explore-search-result-meta {
  gap: 0;
  font-size: 12px;
  color: var(--explore-faint);
  font-variant-numeric: tabular-nums;
}
.explore-search-result-route { letter-spacing: 0.02em; }
.explore-search-result-type {
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-search-result-route:not([hidden]) + .explore-search-result-type:not([hidden])::before {
  content: "\00b7";
  margin: 0 6px;
}
.explore-search-result-tag {
  display: none;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--explore-accent);
}
.explore-search-result-btn.is-selected .explore-search-result-tag { display: inline; }

/* Phones: 42px rail; the controller sizes a right-half sheet (--explore-sheet-*). */
html.airshow-mobile-runtime .explore-search-dock {
  right: 8px;
  --explore-search-width: min(292px, calc(100vw - 16px));
  --explore-rail-size: 42px;
}
html.airshow-mobile-runtime .explore-search-dock.is-collapsed { width: 42px; }
html.airshow-mobile-runtime .explore-search-shell {
  top: calc(-1 * var(--explore-sheet-rise, 0px));
  width: var(--explore-sheet-width, 292px);
  max-height: var(--explore-sheet-max-height, 100%);
}
html.airshow-mobile-runtime .explore-search-head { padding: 8px 8px 6px 12px; }
html.airshow-mobile-runtime .explore-search-body {
  gap: 6px;
  padding: 0 8px 8px;
}
html.airshow-mobile-runtime .explore-search-input-wrap { height: 34px; }
html.airshow-mobile-runtime .explore-search-result-btn { padding: 6px 8px 6px 12px; }

@media (prefers-reduced-motion: reduce) {
  .explore-search-shell,
  .explore-search-launcher-btn,
  .explore-hide-other-planes-btn,
  .explore-search-result-btn {
    transition: none;
  }
}
