/*
    SteveKraft.com Legacy Theme Bridge V1

    Purpose:
    - Let older standalone IIS pages follow websiteTheme.
    - Preserve their existing layout and functionality.
    - Override only presentation/colors.
    - Protect legacy .hero content from homepage-only rules.
*/

body[data-legacy-theme-bridge="true"] {
    --legacy-accent:#029DFB;
    --legacy-accent-rgb:2,157,251;
    --legacy-page-bg:#06090d;
    --legacy-panel-bg:#0f171f;
    --legacy-text:#f4f7fb;
    --legacy-muted:#9aa8b7;

    background:var(--legacy-page-bg) !important;
    color:var(--legacy-text) !important;

    transition:
        background-color .25s ease,
        color .25s ease;
}


/* NORMAL / DIRT EDM BLUE */

body[data-legacy-theme-bridge="true"]
[data-website-theme="normal"] {
    --legacy-accent:#029DFB;
}


/*
    The selector above intentionally remains harmless.
    Normal values already exist on BODY.
*/


/*  */

body[data-legacy-theme-bridge="true"][data-website-theme="sports2j"] {
    --legacy-accent:#f2d100;
    --legacy-accent-rgb:242,209,0;
    --legacy-page-bg:#080808;
    --legacy-panel-bg:#111111;
}


/* NEW YEAR */

body[data-legacy-theme-bridge="true"][data-website-theme="newyear"] {
    --legacy-accent:#e9d75c;
    --legacy-accent-rgb:233,215,92;
}


/* VALENTINE'S DAY */

body[data-legacy-theme-bridge="true"][data-website-theme="valentines"] {
    --legacy-accent:#ff6496;
    --legacy-accent-rgb:255,100,150;
}


/* PRESIDENTS / MEMORIAL / JULY 4 */

body[data-legacy-theme-bridge="true"][data-website-theme="presidents"],
body[data-legacy-theme-bridge="true"][data-website-theme="memorial"],
body[data-legacy-theme-bridge="true"][data-website-theme="fourthofjuly"] {
    --legacy-accent:#78aaff;
    --legacy-accent-rgb:120,170,255;
}


/* ST. PATRICK'S DAY */

body[data-legacy-theme-bridge="true"][data-website-theme="stpatricks"] {
    --legacy-accent:#50dc78;
    --legacy-accent-rgb:80,220,120;
}


/* LABOR DAY */

body[data-legacy-theme-bridge="true"][data-website-theme="laborday"] {
    --legacy-accent:#ffc864;
    --legacy-accent-rgb:255,200,100;
}


/* HALLOWEEN */

body[data-legacy-theme-bridge="true"][data-website-theme="halloween"] {
    --legacy-accent:#ff8228;
    --legacy-accent-rgb:255,130,40;
    --legacy-page-bg:#0b0806;
    --legacy-panel-bg:#17100c;
}


/* THANKSGIVING */

body[data-legacy-theme-bridge="true"][data-website-theme="thanksgiving"] {
    --legacy-accent:#dc9646;
    --legacy-accent-rgb:220,150,70;
    --legacy-page-bg:#0c0906;
    --legacy-panel-bg:#18110b;
}


/* CHRISTMAS */

body[data-legacy-theme-bridge="true"][data-website-theme="christmas"] {
    --legacy-accent:#e74a55;
    --legacy-accent-rgb:231,74,85;
    --legacy-page-bg:#070b09;
    --legacy-panel-bg:#0f1813;
}


/* ----------------------------------------------------------
   PROTECT LEGACY PAGE STRUCTURE
   ---------------------------------------------------------- */

body[data-legacy-theme-bridge="true"] main > .hero {
    display:block !important;
}


/* ----------------------------------------------------------
   GENERIC LEGACY PRESENTATION
   ---------------------------------------------------------- */

body[data-legacy-theme-bridge="true"] a {
    color:var(--legacy-accent) !important;
}

body[data-legacy-theme-bridge="true"] h1,
body[data-legacy-theme-bridge="true"] h2,
body[data-legacy-theme-bridge="true"] h3 {
    text-shadow:
        0 0 18px
        rgba(var(--legacy-accent-rgb),.16);
}

body[data-legacy-theme-bridge="true"] input,
body[data-legacy-theme-bridge="true"] select,
body[data-legacy-theme-bridge="true"] textarea {
    background:#0b1118 !important;
    color:var(--legacy-text) !important;

    border-color:
        rgba(var(--legacy-accent-rgb),.55) !important;
}

body[data-legacy-theme-bridge="true"] input::placeholder,
body[data-legacy-theme-bridge="true"] textarea::placeholder {
    color:var(--legacy-muted) !important;
}

body[data-legacy-theme-bridge="true"] button {
    border-color:
        rgba(var(--legacy-accent-rgb),.55) !important;
}

body[data-legacy-theme-bridge="true"] table,
body[data-legacy-theme-bridge="true"] th,
body[data-legacy-theme-bridge="true"] td {
    border-color:
        rgba(var(--legacy-accent-rgb),.20) !important;
}

body[data-legacy-theme-bridge="true"] hr {
    border-color:
        rgba(var(--legacy-accent-rgb),.25) !important;
}


/*  legacy accents */

body[data-legacy-theme-bridge="true"][data-website-theme="sports2j"]
h1,

body[data-legacy-theme-bridge="true"][data-website-theme="sports2j"]
h2 {

    color:#ffffff !important;
}


/* Maintain usable focus indication */

body[data-legacy-theme-bridge="true"]
a:focus-visible,

body[data-legacy-theme-bridge="true"]
button:focus-visible,

body[data-legacy-theme-bridge="true"]
input:focus-visible {

    outline:
        2px solid var(--legacy-accent) !important;

    outline-offset:2px;
}

/* ==========================================================
   LEGACY BUTTON CONTRAST FIX V1
   ----------------------------------------------------------
   Generic legacy links use the active accent color.

   Buttons must retain readable foreground colors instead of
   inheriting the accent color from the generic anchor rule.
   ========================================================== */

body[data-legacy-theme-bridge="true"] a.button {
    color:var(--legacy-text) !important;
}


/*
primary CTA buttons receive the yellow
background, so use near-black foreground text.
*/

body[data-legacy-theme-bridge="true"][data-website-theme="sports2j"]
a.button.primary {

    color:#090a0b !important;
    text-shadow:none !important;
}


/*
   Same protection for older pages that use .btn rather than
   .button for their primary call-to-action.
*/

body[data-legacy-theme-bridge="true"] a.btn {
    color:var(--legacy-text) !important;
}

body[data-legacy-theme-bridge="true"][data-website-theme="sports2j"]
a.btn.primary {

    color:#090a0b !important;
    text-shadow:none !important;
}


/* END LEGACY BUTTON CONTRAST FIX V1 */