/*
 * Shell-specific styles for the static site — NOT part of the copied design system;
 * never overwritten by build_static.py.
 */

/* ── Header right actions ────────────────────────── */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ════════════════════════════════════════════════════════════════════
   Native form controls — unified dark styling for the STATIC site.
   The static site uses raw <select>/<input>, NOT Dash components, so the
   .dash-dropdown styling in style.css never applies here. Without this,
   selects fall back to native OS chrome (broken-looking, esp. on Windows).
   ════════════════════════════════════════════════════════════════════ */

select,
input[type="text"],
input[type="number"],
input[type="search"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select {
  background-color: var(--bg-card);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s ease;
}
select:hover  { border-color: rgba(255, 255, 255, 0.16); }
select:focus  { border-color: rgba(255, 255, 255, 0.22); }

/* Single-select: hide native arrow (appearance:none) and draw our own chevron */
select:not([multiple]) {
  padding-right: 26px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

/* Multi-select: render as a clean compact scrolling listbox that aligns with
   the single-line controls on the filter bar (default), instead of a tall
   native listbox. Dedicated pickers (e.g. Compare models) get more height. */
select[multiple] {
  height: 32px;
  padding: 0;
  overflow-y: auto;
  cursor: default;
  background-image: none;
  vertical-align: middle;
}
select[multiple] option {
  padding: 5px 10px;
  color: var(--text-2);
  background-color: var(--bg-card);
  font-size: 12px;
}
/* Highlight selected options in the brand accent (works in Chromium/Firefox) */
select[multiple] option:checked {
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 20px var(--accent-dim);  /* forces bg in WebKit */
}
/* Taller boxes for the dedicated multi-pickers that sit on their own rows */
#radar-model-select { height: 110px; }
#local-tags,
#image-provider-filter, #image-tag-filter,
#video-provider-filter, #video-tag-filter { height: 86px; }

/* Keep filter-bar provider box a sensible width but never overflow */
#filter-provider { min-width: 200px; }

/* Custom scrollbars for the listboxes (WebKit) */
select[multiple]::-webkit-scrollbar { width: 8px; }
select[multiple]::-webkit-scrollbar-track { background: transparent; }
select[multiple]::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
select[multiple]::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Native number/text inputs on the static site: match the dark theme + remove
   the spinner so they read consistently across OSes. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ── Filter bar: always allowed to wrap so it auto-fits narrow / portrait
      screens instead of overflowing horizontally ─────────────────────── */
.filters { flex-wrap: wrap; row-gap: 8px; }

/* ════════════════════════════════════════════════════════════════════
   Responsive chart sizing for the STATIC site.
   style.css sizes charts via `.dash-graph` (Dash only) — that selector
   does not exist here, so static charts were stuck at their inline
   min-height:400px. Target the real #chart-* divs with a fluid clamp so
   charts grow/shrink with the viewport on any screen size.
   ════════════════════════════════════════════════════════════════════ */
[id^="chart-"] {
  min-height: clamp(340px, 56vh, 760px) !important;
}
@media (max-width: 768px) {
  [id^="chart-"] { min-height: clamp(300px, 52vh, 520px) !important; }
}

/* ── Static-site additions (Task 2) ──────────────── */

/* Pyodide warm-up status bar at page bottom */
.py-status {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 32px;
  z-index: 300;
  pointer-events: none;
}

/* Detail panel close button */
.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 8px;
  line-height: 1.4;
  transition: color 0.1s ease, border-color 0.1s ease;
}

.detail-close:hover {
  color: var(--text-2);
  border-color: rgba(255,255,255,0.14);
}

/* Detail panel "Add to Compare" button */
.detail-add-btn {
  margin-top: 20px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  text-align: center;
}

.detail-add-btn:hover {
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.30);
  background: var(--accent-dim);
}

/* Data freshness badge */
.freshness {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-3, #666);
  font-family: Inter, -apple-system, sans-serif;
  margin-right: 4px;
  white-space: nowrap;
}

/* Refresh button loading state */
.header-icon-btn.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-card, #15171c);
  border: 1px solid var(--border, #2a2d34);
  color: #e6e6e6;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
