/* FM Plus brand (stroke / UI aligned with fmplus.svg blues) */
:root {
    --fm-plus-blue: #2764e7;
    --fm-plus-blue-bright: #0fafff;
}

/* --- TEAM COLORS and BADGES --- */
@font-face {
    font-family: 'KH Interference';
    src: url('../khinterference-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

.mobile-badge-d, .mobile-badge-c, .badge-driver, .badge-constructor, .badge-driver-small, .badge-constructor-small {
    font-family: 'KH Interference', sans-serif;
    letter-spacing: 0.03em;
    display:flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 32px;
    min-width: 46px;
    border-radius: 3px;
    box-sizing: border-box;
    color:white; /* Default color for all these badges */
    font-size: 17px;
    padding-top: 4px;
}

/* Small badge variants */
.badge-driver-small, .badge-constructor-small {
    width: 32px;
    height: 24px;
    min-width: 32px;
    font-size: 13px;
}

/* Badge text colors: ensure correct contrast on all pages (body season class may be missing) */
.mobile-badge-d.bg-haa, .mobile-badge-c.bg-haa, .badge-driver.bg-haa, .badge-constructor.bg-haa,
.badge-driver-small.bg-haa, .badge-constructor-small.bg-haa, .driver-badge.bg-haa, .constructor-badge.bg-haa,
.tooltip-title.bg-haa, .text-haa {
    color: #000000 !important;
}
.mobile-badge-d.bg-sau, .mobile-badge-c.bg-sau, .badge-driver.bg-sau, .badge-constructor.bg-sau,
.badge-driver-small.bg-sau, .badge-constructor-small.bg-sau, .driver-badge.bg-sau, .constructor-badge.bg-sau,
.tooltip-title.bg-sau, .text-sau {
    color: #000000 !important;
}
.mobile-badge-d.bg-vrb, .mobile-badge-c.bg-vrb, .badge-driver.bg-vrb, .badge-constructor.bg-vrb,
.badge-driver-small.bg-vrb, .badge-constructor-small.bg-vrb, .driver-badge.bg-vrb, .constructor-badge.bg-vrb,
.tooltip-title.bg-vrb, .text-vrb,
.mobile-badge-d.bg-rb, .mobile-badge-c.bg-rb, .badge-driver.bg-rb, .badge-constructor.bg-rb,
.badge-driver-small.bg-rb, .badge-constructor-small.bg-rb, .driver-badge.bg-rb, .constructor-badge.bg-rb,
.tooltip-title.bg-rb, .text-rb {
    color: #2741b5 !important;
}
.mobile-badge-d.bg-rbr, .mobile-badge-c.bg-rbr, .badge-driver.bg-rbr, .badge-constructor.bg-rbr,
.badge-driver-small.bg-rbr, .badge-constructor-small.bg-rbr, .driver-badge.bg-rbr, .constructor-badge.bg-rbr,
.tooltip-title.bg-rbr, .text-rbr {
    color: #ffd300 !important;
}
.mobile-badge-d.bg-red, .mobile-badge-c.bg-red, .badge-driver.bg-red, .badge-constructor.bg-red,
.badge-driver-small.bg-red, .badge-constructor-small.bg-red, .driver-badge.bg-red, .constructor-badge.bg-red,
.tooltip-title.bg-red, .text-red {
    color: #ffd300 !important;
}

/* Unknown/missing team – fallback so badges always have a visible style */
.bg-unk {
    background: linear-gradient(135deg, #4b5563 60%, #6b7280 100%);
    border: 2px solid #4b5563;
    border-radius: 5px;
    box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.text-unk { color: #ffffff !important; }
.border-unk { border-color: #4b5563 !important; }

/* --- UPGRADE (CHIP) BADGES ---
   Used by templates via the partial: templates/partials/chip_badge.html
   Classes are keyed by chip code: chip-autopilot, chip-extra_drs, etc.
*/
.chip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    font-size: 0.65rem;
    line-height: 1;
    padding: 0.28rem 0.55rem;
    border-radius: 9999px;

    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #fff;

    /* subtle stroke + "breathing room" look */
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22) inset,
      0 0 0 2px rgba(255, 255, 255, 0.08);
}

.chip-badge svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-right: -3px;
}

/* Some icons read visually smaller; give them a nudge. */
.chip-badge svg.chip-icon--lg {
    width: 23px;
    height: 23px;
    margin-right: -6px;
}

/* Upgrade color scheme */
.chip-autopilot { /* Turbomatic */
    background-color: #0F766E; /* dark teal */
}

.chip-extra_drs { /* Triple Threat */
    background-color: #BE185D; /* dark hot pink */
}

.chip-no_negative { /* Y.O.L.0 */
    background-color: #A16207; /* dark yellow */
}

.chip-wildcard { /* Overhaul */
    background-color: #C2410C; /* orangey red */
}

.chip-limitless { /* Unlimited! */
    background-color: #3F3F46; /* darkish gray */
}

.chip-final_fix { /* Parc Ouvert */
    background-color: #166534; /* green */
}

.monofont {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  letter-spacing: 0.03em;
}

/*
  YEARLY TEAM COLORS / BADGES

  IMPORTANT:
  - UI code uses classes like .bg-rbr / .text-rbr / .border-rbr.
  - We scope those by season using a body class: .season-YYYY
  - Each season can have its own palette/livery tweaks.

  Base template now sets: <body class="... season-{{ race.season }}">
*/

/* === 2025 TEAM COLORS === */
.season-2025 .bg-rbr { 
  background: linear-gradient(135deg, #003773 60%, #0055b7 100%);
  border: 2px solid #003773;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-fer { 
  background: linear-gradient(135deg, #DC0000 60%, #ff3c3c 100%);
  border: 2px solid #DC0000;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-mer { 
  background: linear-gradient(135deg, #00A19C 60%, #00d2be 100%);
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-mcl { 
  background: linear-gradient(135deg, #FF8700 60%, #ffd180 100%);
  border: 2px solid #FF8700;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-ast { 
  background: linear-gradient(135deg, #006F62 60%, #00b386 100%);
  border: 2px solid #006F62;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-alp { 
  background: linear-gradient(135deg, #F282B4 60%, #f7c4e2 100%);
  border: 2px solid #F282B4;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-wil { 
  background: linear-gradient(135deg, #0600EF 60%, #3c6aff 100%);
  border: 2px solid #0600EF;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-vrb { 
  background: linear-gradient(135deg, #ffffff 75%, #ffffff 100%);
  color: #2741b5;
  border: 2px solid #4141a7;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-sau { 
  background: linear-gradient(135deg, #07d600 60%, #7cffb2 100%);
  color: #000000;
  border: 2px solid #07d600;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}
.season-2025 .bg-haa { 
  background: linear-gradient(135deg, #888888 60%, #e7e7e7 100%);
  color: #000000 !important;
  border: 2px solid #888888;
  border-radius: 5px;
  box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
}

/* === 2026 TEAM COLORS ===
*/
/* 2026 — RBR */
 .season-2026 .bg-rbr,
 .season-2026 .bg-red {
   background: linear-gradient(135deg, #003773 60%, #0055b7 100%);
   border: 2px solid #e21b4d;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-rbr { color: #ffd300 !important; }
 .season-2026 .border-rbr { border-color: #e21b4d !important; }
 .season-2026 .player-card.bg-rbr { border: 2px solid #e21b4d; border-radius: 5px; }

/* 2026 — FER */
 .season-2026 .bg-fer {
   background: linear-gradient(135deg, #ff3c3c 0%, #ff3c3c 20%, #dc0000 60%, #dc0000 40%, #ff3c3c 80%, #ff3c3c 100%);
   border: 2px solid #ffe0e0;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-fer { color: #ffffff !important; }
 .season-2026 .border-fer { border-color: #ffe0e0 !important; }
 .season-2026 .player-card.bg-fer { border: 2px solid #ffe0e0; border-radius: 5px; }

/* 2026 — MER */
 .season-2026 .bg-mer {
   background: linear-gradient(180deg, #00a19b 0%, #00a19b 6%, #565f64 32%, #565f64 67%, #00a19b 95%, #00a19b 100%);
   border: 2px solid #3cd3ad;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-mer { color: #ffffff !important; }
 .season-2026 .border-mer { border-color: #3cd3ad !important; }
 .season-2026 .player-card.bg-mer { border: 2px solid #3cd3ad; border-radius: 5px; }

/* 2026 — MCL */
 .season-2026 .bg-mcl {
   background: linear-gradient(135deg, #ff8700 60%, #ffd180 100%);
   border: 2px solid #ff8700;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-mcl { color: #ffffff !important; }
 .season-2026 .border-mcl { border-color: #ff8700 !important; }
 .season-2026 .player-card.bg-mcl { border: 2px solid #ff8700; border-radius: 5px; }

/* 2026 — AST */
 .season-2026 .bg-ast {
   background: linear-gradient(135deg, #00b386 0%, #00b386 6%, #006f62 28%, #006f62 71%, #00b386 91%, #00b386 100%);
   border: 2px solid #006f62;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-ast { color: #ffffff !important; }
 .season-2026 .border-ast { border-color: #006f62 !important; }
 .season-2026 .player-card.bg-ast { border: 2px solid #006f62; border-radius: 5px; }

/* 2026 — ALP */
 .season-2026 .bg-alp {
   background: linear-gradient(135deg, #f7c4e2 0%, #f7c4e2 0%, #f282b4 29%, #f282b4 71%, #f7c4e2 100%, #f7c4e2 100%);
   border: 2px solid #0055b7;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-alp { color: #ffffff !important; }
 .season-2026 .border-alp { border-color: #0055b7 !important; }
 .season-2026 .player-card.bg-alp { border: 2px solid #0055b7; border-radius: 5px; }

/* 2026 — WIL */
 .season-2026 .bg-wil {
   background: linear-gradient(135deg, #a9bcf9 0%, #a9bcf9 5%, #0600ef 45%, #0600ef 55%, #a9bcf9 95%, #a9bcf9 100%);
   border: 2px solid #0600ef;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-wil { color: #ffffff !important; }
 .season-2026 .border-wil { border-color: #0600ef !important; }
 .season-2026 .player-card.bg-wil { border: 2px solid #0600ef; border-radius: 5px; }

/* 2026 — AUD */
 .season-2026 .bg-aud,
 .season-2026 .bg-sau {
   background: linear-gradient(34deg, #808080 0%, #808080 0%, #ff0a0a 4%, #ff0a0a 22%, #808080 30%, #808080 100%);
   border: 2px solid #4f4f4f;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-aud,
 .season-2026 .text-sau { color: #ffffff !important; }
 .season-2026 .border-aud,
 .season-2026 .border-sau { border-color: #4f4f4f !important; }
 .season-2026 .player-card.bg-aud { border: 2px solid #00a19b; border-radius: 5px; }

/* 2026 — HAA */
 .season-2026 .bg-haa {
   background: linear-gradient(13deg, #e10e0e 0%, #e10e0e 0%, #fafafa 18%, #fafafa 78%, #d50707 96%, #d50707 100%);
   border: 2px solid #000000;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-haa { color: #050505 !important; }
 .season-2026 .border-haa { border-color: #000000 !important; }
 .season-2026 .player-card.bg-haa { border: 2px solid #000000; border-radius: 5px; }

/* 2026 — CAD */
 .season-2026 .bg-cad {
   background: linear-gradient(180deg, #565f64 0%, #565f64 14%, #000000 32%, #000000 69%, #565f64 85%, #565f64 100%);
   border: 2px solid #383838;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-cad { color: #fafafa !important; }
 .season-2026 .border-cad { border-color: #383838 !important; }
 .season-2026 .player-card.bg-cad { border: 2px solid #383838; border-radius: 5px; }

/* 2026 — RB */
 .season-2026 .bg-rb,
 .season-2026 .bg-vrb {
   background: linear-gradient(120deg, #0055b7 0%, #0055b7 0%, #ffffff 36%, #ffffff 64%, #0055b7 100%, #0055b7 100%);
   border: 2px solid #023877;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-rb,
 .season-2026 .text-vrb { color: #01346d !important; }
 .season-2026 .border-rb,
 .season-2026 .border-vrb { border-color: #0055b7 !important; }
 .season-2026 .player-card.bg-rb { border: 2px solid #0055b7; border-radius: 5px; }

/* 2026 — RED */
 .season-2026 .bg-red {
   background: linear-gradient(135deg, #0055b7 0%, #0055b7 0%, #003773 20%, #003773 40%, #0055b7 80%, #0055b7 100%);
   border: 2px solid #e21b4d;
   border-radius: 5px;
   box-shadow: 2px 6px 10px -2px rgba(0,0,0,0.18);
 }
 .season-2026 .text-red { color: #ffd22e !important; }
 .season-2026 .border-red { border-color: #e21b4d !important; }
 .season-2026 .player-card.bg-red { border: 2px solid #e21b4d; border-radius: 5px; }
