@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@500;600;700&display=swap");

/* ═══════════════════════════════════════════════════════════════
   MOCKUP-8 "TACTICAL PANEL" THEME
   All selectors verified against live DOM:
     - Every <li class="service"> carries data-name="<YAML key>"
     - aria-label selectors were non-matching; data-name is definitive
   ═══════════════════════════════════════════════════════════════ */

/* ── Palette ─────────────────────────────────────────────────── */
:root {
  --bg-1:     #060a14;
  --bg-2:     #111b32;
  --panel:    rgba(15, 24, 42, 0.86);
  --chip:     rgba(18, 31, 54, 0.96);
  --border:   #2e446f;
  --border-s: #3b588e;
  --rule:     #304975;
  --text:     #d9e7ff;
  --bright:   #f3f8ff;
  --muted:    #90a9ca;
  --head:     #bfdbff;
  --ok:       #34d399;
  --bad:      #fb7185;
}

/* ── Background + grid ───────────────────────────────────────── */
body {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2)) fixed !important;
  color: var(--text) !important;
  font-family: "Space Grotesk", sans-serif !important;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(26,42,70,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,42,70,0.35) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  z-index: -1;
}

/* ── Header bar ──────────────────────────────────────────────── */
header, .header, [class*="header"] {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 14px rgba(0,6,15,0.45) !important;
  backdrop-filter: blur(2px);
}

/* ── Section group labels (Status, Calendar, News, Data…) ────── */
h1, h2, h3,
[class*="section-title"], [class*="group-title"] {
  font-family: "Space Grotesk", sans-serif !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--head) !important;
}

/* ── Row/column gaps ─────────────────────────────────────────── */
main, [class*="page-content"], [class*="services"] { row-gap: 6px !important; }
.services-group, [class*="services-group"] { gap: 6px !important; }

/* ══════════════════════════════════════════════════════════════
   SERVICE CARD BASE  — all cards get panel + blue accent rule
   ══════════════════════════════════════════════════════════════ */
.service-card {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  position: relative;
  overflow: hidden;
}
/* 2 px blue accent at top of every card */
.service-card::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #5d8bff);
  opacity: 0.8;
}

/* ══════════════════════════════════════════════════════════════
   STATUS STRIP  (Game Pulse / Market Pulse / Ops Pulse)
   Static-href cards — no widget inside, just icon + name + desc
   ══════════════════════════════════════════════════════════════ */
li[data-name="Game Pulse"]   .service-card,
li[data-name="Market Pulse"] .service-card,
li[data-name="Ops Pulse"]    .service-card {
  padding: 8px 12px !important;
  min-height: 0 !important;
}
li[data-name="Game Pulse"]   .service-name,
li[data-name="Market Pulse"] .service-name,
li[data-name="Ops Pulse"]    .service-name {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--head) !important;
}
li[data-name="Game Pulse"]   .service-description,
li[data-name="Market Pulse"] .service-description,
li[data-name="Ops Pulse"]    .service-description {
  font-family: "JetBrains Mono", monospace !important;
  font-size: 11px !important;
  color: var(--bright) !important;
  text-transform: none !important;
}

/* ══════════════════════════════════════════════════════════════
   SCORES  (li[data-name="Scores"]) — vertical row-list panel
   QUOTES  (li[data-name="Quotes"]) — same treatment

   DOM structure inside each .service-card:
     .service-container            ← default: flex-row, flex-wrap
       .service-block              ← one per team/symbol
         .font-thin .text-sm      ← VALUE (appears first in DOM)
         .font-bold .text-xs .uppercase  ← LABEL (appears second)

   Goal: column of chips, label LEFT (order:1), value RIGHT (order:2)
   ══════════════════════════════════════════════════════════════ */

/* 1. Scores: single column stack */
li[data-name="Scores"] .service-container {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 2px !important;
  padding: 4px !important;
}

/* Scores + Quotes: opt out of grid row-stretch so each card sizes to its own content */
li[data-name="Scores"],
li[data-name="Quotes"] {
  align-self: start !important;
}
li[data-name="Scores"] .service-card,
li[data-name="Quotes"] .service-card {
  height: auto !important;
  overflow: visible !important;
}

/* 1b. Quotes: flex-wrap into 2 columns so all 11 tickers fit */
li[data-name="Quotes"] .service-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  align-items: stretch !important;
  gap: 2px !important;
  padding: 4px !important;
}

/* 2. Scores blocks: full-width rows */
li[data-name="Scores"] .service-block {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 22px !important;
  padding: 2px 8px !important;
  margin: 0 !important;
  border-radius: 3px !important;
  background: var(--chip) !important;
  border: 1px solid var(--border-s) !important;
  gap: 8px !important;
}

/* 2b. Quotes blocks: half-width so they pair into 2 columns */
li[data-name="Quotes"] .service-block {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 calc(50% - 1px) !important;
  width: calc(50% - 1px) !important;
  min-height: 22px !important;
  padding: 2px 8px !important;
  margin: 0 !important;
  border-radius: 3px !important;
  background: var(--chip) !important;
  border: 1px solid var(--border-s) !important;
  gap: 8px !important;
}

/* 3. LABEL — fixed-width left column (order:1 pushes it before value) */
li[data-name="Scores"] .service-block .font-bold,
li[data-name="Scores"] .service-block .uppercase,
li[data-name="Quotes"] .service-block .font-bold,
li[data-name="Quotes"] .service-block .uppercase {
  order: 1 !important;
  flex: 0 0 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--bright) !important;
  text-align: left !important;
  line-height: 1 !important;
}

/* 4. VALUE — fills rest, right-aligned */
li[data-name="Scores"] .service-block .font-thin,
li[data-name="Scores"] .service-block .text-sm,
li[data-name="Quotes"] .service-block .font-thin,
li[data-name="Quotes"] .service-block .text-sm {
  order: 2 !important;
  flex: 1 1 auto !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  text-align: right !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ══════════════════════════════════════════════════════════════
   NEWS RAIL  (AP News / Reuters / Ars Technica)
   Static hrefs — compact chip, source name prominent
   ══════════════════════════════════════════════════════════════ */
li[data-name="AP News"]      .service-card,
li[data-name="Reuters"]      .service-card,
li[data-name="Ars Technica"] .service-card {
  padding: 8px 12px !important;
  min-height: 0 !important;
}
li[data-name="AP News"]      .service-name,
li[data-name="Reuters"]      .service-name,
li[data-name="Ars Technica"] .service-name {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--head) !important;
  line-height: 1.1 !important;
}
li[data-name="AP News"]      .service-description,
li[data-name="Reuters"]      .service-description,
li[data-name="Ars Technica"] .service-description {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: 11px !important;
  color: var(--muted) !important;
  text-transform: none !important;
  line-height: 1.2 !important;
}

/* ══════════════════════════════════════════════════════════════
   CALENDAR  — agenda/list view styling
   ══════════════════════════════════════════════════════════════ */
.fc {
  background: transparent !important;
  color: var(--text) !important;
}
.fc .fc-toolbar {
  margin-bottom: 4px !important;
}
.fc .fc-toolbar-title {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--head) !important;
}
/* List view: each event row as chip */
.fc .fc-list-table {
  border: none !important;
}
.fc .fc-list-event {
  background: var(--chip) !important;
  border: 1px solid var(--border-s) !important;
  border-radius: 3px !important;
}
.fc .fc-list-event td {
  border: none !important;
  padding: 4px 8px !important;
}
.fc .fc-list-event-time {
  font-family: "JetBrains Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--bright) !important;
  white-space: nowrap !important;
}
.fc .fc-list-event-title {
  font-family: "Space Grotesk", sans-serif !important;
  font-size: 12px !important;
  color: var(--text) !important;
}
.fc .fc-list-day-cushion {
  background: rgba(26,42,70,0.6) !important;
  padding: 3px 8px !important;
}
.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  font-family: "JetBrains Mono", monospace !important;
  font-size: 10px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
}
.fc .fc-day-today {
  background: rgba(56,189,248,0.15) !important;
}

/* ══════════════════════════════════════════════════════════════
   HEADER WIDGETS (datetime, weather, search)
   ══════════════════════════════════════════════════════════════ */
.information-widget,
[class*="information-widget"],
[class*="widget-card"] {
  background: var(--chip) !important;
  border: 1px solid var(--border-s) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  padding: 6px 10px !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.04em !important;
}
