/* ===================================================== */
/* OddsAccuracy — GLOBAL THEME CONFIG                    */
/* Single source of truth for ALL surfaces & skins       */
/* ===================================================== */

/* ===================== */
/* THEME VARIABLES       */
/* ===================== */

:root {
  /* ---------- App Background ---------- */
  --oa-app-bg:
    radial-gradient(1200px 700px at 20% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(168, 85, 247, 0.18), transparent 55%),
    #0b1220;

  /* ---------- Overlay (See Report) ---------- */
  --oa-overlay-bg: rgba(0, 0, 0, 0.55);
  --oa-overlay-blur: blur(6px);

  /* ---------- Hero Surfaces (Header / Tabs / Hero Cards) ---------- */
  --oa-hero-gradient:
    linear-gradient(
      90deg,
      rgba(30, 58, 138, 0.30),
      rgba(88, 28, 135, 0.30)
    );
  --oa-hero-border: rgba(59, 130, 246, 0.30);

  /* ---------- Header / Tabs Surface (match MAI & TAI calmness) ---------- */
  --oa-header-surface-bg: rgba(15, 23, 42, 0.78);

  /* ---------- Report Document ---------- */
  --oa-report-bg: var(--oa-app-bg);
  --oa-report-border: rgba(59, 130, 246, 0.16);
  --oa-report-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);

  /* ---------- Report Cards ---------- */
  --oa-report-card-bg: rgba(255, 255, 255, 0.03);
  --oa-report-card-border: rgba(59, 130, 246, 0.18);
  --oa-report-card-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);

  /* ---------- Dashboard Cards (.card) ---------- */
  --oa-dash-card-bg: rgba(255, 255, 255, 0.035);
  --oa-dash-card-border: rgba(59, 130, 246, 0.16);
  --oa-dash-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --oa-dash-card-border-hover: rgba(59, 130, 246, 0.28);
  --oa-dash-card-shadow-hover: 0 18px 60px rgba(0, 0, 0, 0.55);

  /* ---------- Dashboard Boxed Blocks (Tailwind override) ---------- */
  --oa-dash-box-bg: rgba(255, 255, 255, 0.035);
  --oa-dash-box-border: rgba(59, 130, 246, 0.16);
  --oa-dash-box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --oa-dash-box-border-hover: rgba(59, 130, 246, 0.28);
  --oa-dash-box-shadow-hover: 0 18px 60px rgba(0, 0, 0, 0.55);

  /* ---------- Dashboard Controls (MA + Opening/Closing) ---------- */
  --oa-ctrl-wrap-bg: rgba(255, 255, 255, 0.04);
  --oa-ctrl-wrap-border: rgba(59, 130, 246, 0.18);

  --oa-ctrl-btn-bg: rgba(255, 255, 255, 0.02);
  --oa-ctrl-btn-border: rgba(148, 163, 184, 0.14);
  --oa-ctrl-btn-text: rgba(226, 232, 240, 0.75);

  --oa-ctrl-btn-hover-bg: rgba(255, 255, 255, 0.05);
  --oa-ctrl-btn-hover-border: rgba(59, 130, 246, 0.28);

  --oa-ctrl-btn-active-bg: rgba(37, 99, 235, 0.85);
  --oa-ctrl-btn-active-border: rgba(37, 99, 235, 1);
  --oa-ctrl-btn-active-text: #ffffff;

  --oa-ctrl-focus-ring: rgba(59, 130, 246, 0.35);

  /* ---------- Legend Scroll (MAI / TAI) ---------- */
  --oa-legend-bg: rgba(255, 255, 255, 0.03);
  --oa-legend-border: rgba(59, 130, 246, 0.14);

  --oa-legend-scrollbar-track: rgba(255, 255, 255, 0.02);
  --oa-legend-scrollbar-thumb: rgba(59, 130, 246, 0.35);
  --oa-legend-scrollbar-thumb-hover: rgba(59, 130, 246, 0.55);

  /* ---------- Chart Surface (MAI / TAI) ---------- */
  --oa-chart-bg: rgba(15, 23, 42, 0.55);

  /* ---------- MAI Chart Card Surface (reduce gradient intensity) ---------- */
  --oa-mai-chart-card-bg: rgba(15, 23, 42, 0.78);

  /* ---------- Footer ---------- */
  --oa-footer-bg: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.55),
    rgba(15, 23, 42, 0.75)
  );
  --oa-footer-border: rgba(59, 130, 246, 0.18);
  --oa-footer-text: rgba(203, 213, 225, 0.70);
  --oa-footer-link: rgba(203, 213, 225, 0.85);
  --oa-footer-link-hover: #ffffff;

  /* ---------- Sticky Header / Tabs Surface (match MAI & TAI) ---------- */
  --oa-header-surface-bg: var(--oa-mai-chart-card-bg, rgba(15, 23, 42, 0.78));

}

/* ===================== */
/* GLOBAL BACKGROUND     */
/* ===================== */

html {
  background: var(--oa-app-bg);
  min-height: 100%;
}

body {
  background: transparent !important;
  background-color: transparent !important;
}

/* ===================== */
/* OVERLAY (See Report)  */
/* ===================== */

#oa-mini-report-overlay.oa-overlay {
  background: var(--oa-overlay-bg) !important;
  backdrop-filter: var(--oa-overlay-blur);
  -webkit-backdrop-filter: var(--oa-overlay-blur);
}

/* ===================== */
/* HERO SURFACES         */
/* ===================== */

.oa-hero-surface {
  background: var(--oa-hero-gradient);
  border-bottom: 1px solid var(--oa-hero-border);
}

.oa-hero-card {
  background: var(--oa-hero-gradient);
  border: 1px solid var(--oa-hero-border);
}

/* ===================== */
/* HEADER + TABS (calm)  */
/* ===================== */

/* Top header (title area) */
header.oa-hero-surface {
  background: var(--oa-header-surface-bg) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Navigation tabs bar */
nav.oa-hero-surface {
  background: var(--oa-header-surface-bg) !important;
  border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

/* ===================== */
/* SEE REPORT            */
/* ===================== */

.oa-report-surface {
  background: var(--oa-report-bg);
  border: 1px solid var(--oa-report-border);
  box-shadow: var(--oa-report-shadow);
  border-radius: 14px;
}

.oa-report-card {
  background: var(--oa-report-card-bg);
  border: 1px solid var(--oa-report-card-border);
  box-shadow: var(--oa-report-card-shadow);
  border-radius: 16px;
}

/* ===================== */
/* DASHBOARD — .card     */
/* ===================== */

.card {
  background: var(--oa-dash-card-bg) !important;
  background-color: transparent !important;
  border: 1px solid var(--oa-dash-card-border) !important;
  box-shadow: var(--oa-dash-card-shadow) !important;
  border-radius: 16px;
}

.card:hover {
  border-color: var(--oa-dash-card-border-hover) !important;
  box-shadow: var(--oa-dash-card-shadow-hover) !important;
}

/* ===================== */
/* DASHBOARD — BOXED     */
/* Tailwind overrides    */
/* ===================== */

#main-content .bg-neutral-900\/40,
#main-content .bg-neutral-900,
#main-content .bg-neutral-800 {
  background: var(--oa-dash-box-bg) !important;
  background-color: transparent !important;
}

#main-content .border-neutral-700 {
  border-color: var(--oa-dash-box-border) !important;
}

#main-content .rounded-lg.border.border-neutral-700 {
  box-shadow: var(--oa-dash-box-shadow) !important;
}

#main-content .rounded-lg.border.border-neutral-700:hover {
  border-color: var(--oa-dash-box-border-hover) !important;
  box-shadow: var(--oa-dash-box-shadow-hover) !important;
}

/* MAI chart card — make background calm like TAI (card surface, not canvas tricks) */
#chart-card,
#chart-card .bg-neutral-900\/40,
#chart-card .bg-neutral-900,
#chart-card .bg-neutral-800,
#chart-card .chart-container,
#chart-card canvas {
  background: var(--oa-mai-chart-card-bg) !important;
}

/* ===================== */
/* DASHBOARD CONTROLS    */
/* Scoped to #main-content so See Report is untouched */
/* ===================== */

#main-content .odds-type-toggle {
  background: var(--oa-ctrl-wrap-bg) !important;
  border: 1px solid var(--oa-ctrl-wrap-border) !important;
  border-radius: 12px;
}

/* Odds toggle buttons (Opening/Closing) */
#main-content .odds-type-button {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--oa-ctrl-btn-text) !important;
  border-radius: 10px;
}

#main-content .odds-type-button:hover {
  background: var(--oa-ctrl-btn-hover-bg) !important;
  border-color: var(--oa-ctrl-btn-hover-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

/* Active state */
#main-content .odds-type-button.active {
  background: var(--oa-ctrl-btn-active-bg) !important;
  border-color: var(--oa-ctrl-btn-active-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

/* MA buttons (15/30/50) */
#main-content .card-ma-button {
  background: var(--oa-ctrl-btn-bg) !important;
  border: 1px solid var(--oa-ctrl-btn-border) !important;
  color: var(--oa-ctrl-btn-text) !important;
  border-radius: 10px;
}

#main-content .card-ma-button:hover {
  background: var(--oa-ctrl-btn-hover-bg) !important;
  border-color: var(--oa-ctrl-btn-hover-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

/* If your MA button uses an active class, we support both patterns safely */
#main-content .card-ma-button.active,
#main-content .card-ma-button[aria-pressed="true"] {
  background: var(--oa-ctrl-btn-active-bg) !important;
  border-color: var(--oa-ctrl-btn-active-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

/* Focus visibility (keyboard) */
#main-content .card-ma-button:focus-visible,
#main-content .odds-type-button:focus-visible {
  outline: 2px solid var(--oa-ctrl-focus-ring) !important;
  outline-offset: 2px;
}

/* MA buttons — active/inactive are implemented via Tailwind class swaps */
#main-content .card-ma-button.bg-blue-600,
#main-content .card-ma-button.bg-blue-500,
#main-content .card-ma-button.bg-blue-700 {
  background: var(--oa-ctrl-btn-active-bg) !important;
  border-color: var(--oa-ctrl-btn-active-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

#main-content .card-ma-button.bg-neutral-700,
#main-content .card-ma-button.bg-neutral-800,
#main-content .card-ma-button.bg-neutral-900 {
  background: var(--oa-ctrl-btn-bg) !important;
  border-color: var(--oa-ctrl-btn-border) !important;
  color: var(--oa-ctrl-btn-text) !important;
}

/* Hover should not “flip” into Tailwind blue; keep our hover skin */
#main-content .card-ma-button.bg-neutral-700:hover,
#main-content .card-ma-button.bg-neutral-800:hover,
#main-content .card-ma-button.bg-neutral-900:hover {
  background: var(--oa-ctrl-btn-hover-bg) !important;
  border-color: var(--oa-ctrl-btn-hover-border) !important;
  color: var(--oa-ctrl-btn-active-text) !important;
}

/* ===================== */
/* DOC PAGES — CARD BG   */
/* Used in: Terms / Methodology / How-to */
/* ===================== */

.oa-doc-card {
  background: rgba(255, 255, 255, 0.035);
}

/* ===================== */
/* ABOUT PAGE            */
/* ===================== */

.oa-about {
  max-width: 900px;
  margin: 80px auto 40px auto;
  padding: 0 24px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.oa-about h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* ===================== */
/* FOOTER SURFACE        */
/* ===================== */

.oa-footer-surface {
  background: var(--oa-footer-bg);
  border-top: 1px solid var(--oa-footer-border);
  color: var(--oa-footer-text);
}

.oa-footer-surface a {
  color: var(--oa-footer-link);
  text-decoration: none;
}

.oa-footer-surface a:hover {
  color: var(--oa-footer-link-hover);
}

/* ===================== */
/* STICKY HEADER + TABS  */
/* (single sticky shell) */
/* ===================== */

/* ===================== */
/* STICKY HEADER + TABS  */
/* Guaranteed behavior   */
/* ===================== */

.oa-sticky-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;

  background: var(--oa-header-surface-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

/* Ensure inner header/nav don't override the shell background */
.oa-sticky-shell header,
.oa-sticky-shell nav {
  background: transparent !important;
}

/* Push the page content down so it doesn't hide under the fixed header */
body {
  padding-top: 42px;

}

@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
}

/* Ensure inner header/nav don't override the shell background */
.oa-sticky-shell header,
.oa-sticky-shell nav {
  background: transparent !important;
}
