/* ============================================================
   cheer-v11-polish.css — v1.1 SHELL POLISH · Oct 6, 2026
   Load this file LAST (after site.css and cheer-v11.css).
   It is purely additive: it guards against stale/older CSS on
   the server and fixes shell-level bugs found in the Oct 6
   test screenshots. Safe to deploy with the restyle pack.
   ============================================================ */

/* ---------- 1. TOKEN SAFETY PINS ----------
   The test server was rendering helper text in a cool blue-grey,
   which means an older stylesheet (old muted tokens) is being
   served. These pins force the warm v1.1 values even if a stale
   site.css / cheer-v11.css sneaks through a cache. */
body.cp-v11 {
    --cp-wine: #7C2D45;
    --cp-wine-dark: #5E2134;
    --cp-blush: #F7E6EB;
    --cp-blush-soft: #FBF4F6;
    --cp-cream: #FBF7F2;
    --cp-ink: #3A3335;
    --cp-muted: #6E6366;
    --text-secondary: #6E6366;
    --text-muted: #7C7074;
}
body.cp-v11 .cp-help { color: var(--cp-muted); }

/* ---------- 2. ANCHOR-BUTTON TEXT (the invisible buttons) ----------
   `body.cp-v11 a { color: wine }` out-specifies `.cp-btn { color:#fff }`,
   so every BUTTON rendered as an <a> (Go Pro, See plans, Save day
   sheet, the Payments CTA) was wine-on-wine = invisible. These
   guards win against any anchor rule, current or stale. */
body.cp-v11 a.cp-btn,          body.cp-v11 a.cp-btn:hover,          body.cp-v11 a.cp-btn:visited,
body.cp-v11 a.cp-btn-danger,   body.cp-v11 a.cp-btn-danger:hover,   body.cp-v11 a.cp-btn-danger:visited,
body.cp-v11 a.btn-primary,     body.cp-v11 a.btn-primary:hover,     body.cp-v11 a.btn-primary:visited {
    color: #FFFFFF !important;
}
body.cp-v11 a.cp-btn-secondary, body.cp-v11 a.cp-btn-secondary:visited,
body.cp-v11 a.cp-btn-dashed,    body.cp-v11 a.cp-btn-dashed:visited {
    color: var(--cp-wine) !important;
}
body.cp-v11 a.cp-btn-ghost, body.cp-v11 a.cp-btn-ghost:visited {
    color: var(--cp-muted) !important;
}
/* Belt-and-braces: if a stale cheer-v11.css is ever served, these
   keep the primary buttons looking like buttons at all. */
body.cp-v11 a.cp-btn, body.cp-v11 a.btn-primary {
    background: var(--cp-wine);
    text-decoration: none;
}

/* ---------- 3. OFF-BRAND BLUE LINKS → WINE ----------
   Legacy markup styles quiet links ("Edit ›", "Manage ›",
   "Restore") with inline color:var(--school) — the slate blue
   reserved for SCHOOL-type events only. Inline styles can only be
   beaten with !important, so: any anchor inline-colored with the
   school token becomes a wine link. (School event chips/labels are
   not anchors styled this way — verified across the codebase.) */
body.cp-v11 a[style*="--school"],
body.cp-v11 a[style*="--school"]:visited {
    color: var(--cp-wine) !important;
}

/* ---------- 4. NATIVE CHECKBOXES & RADIOS ON-BRAND ---------- */
body.cp-v11 input[type="checkbox"],
body.cp-v11 input[type="radio"] {
    accent-color: var(--cp-wine);
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    cursor: pointer;
}

/* ---------- 5. DESKTOP CENTERING ----------
   Before: .app-container centered itself against the FULL viewport
   and then padded 280px for the fixed sidebar — on wide monitors
   the content column drifts far right of the visual center, and
   onboarding pages (which have NO sidebar) carry a 280px ghost
   gutter. After: the sidebar space is reserved on the <body>, and
   the container centers in what remains. Pages without a sidebar
   (onboarding) drop the reservation entirely. */
@media (min-width: 1024px) {
    body.cp-v11 { padding-left: 240px; }
    body.cp-v11 .app-container {
        max-width: 1100px !important;
        margin: 0 auto !important;
        padding: 32px 24px !important;
    }
    /* No bottom-nav rendered (onboarding / auth pages): no sidebar gutter. */
    body.cp-v11:not(:has(.bottom-nav)) { padding-left: 0; }
}
@media (min-width: 1440px) {
    body.cp-v11 { padding-left: 260px; }
    body.cp-v11 .app-container {
        max-width: 1280px !important;
        padding: 32px !important;
    }
    body.cp-v11:not(:has(.bottom-nav)) { padding-left: 0; }
}

/* ---------- 6. SIDEBAR NAV ICONS (pairs with new BottomNav.ascx) ----------
   The nav now ships inline stroke SVGs instead of emoji (📅 👤 ⎋
   rendered as blue/purple Windows emoji). These rules size them in
   both layouts: icon-above-label tabs on mobile, icon-tile rows in
   the desktop sidebar. */
.nav-tab-icon svg, .nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}
@media (max-width: 1023px) {
    .nav-tab-icon svg, .nav-icon svg { width: 24px; height: 24px; }
}

/* ---------- 7. SMALL SAFETIES ---------- */
/* Serif headings even if a stale site.css is served */
body.cp-v11 h1, body.cp-v11 h2, body.cp-v11 h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
}
/* Never allow sideways scroll from the shell */
body.cp-v11 { overflow-x: hidden; }
