/* Forecast-only merged header: state identity + photos in gradient block */

body.race-view-forecast section.state-race-page-head--forecast-hero {
    border-bottom: none;
}

body.race-view-forecast .state-race-page-head--forecast-hero .state-race-page-head-pad {
    padding-top: 1.35rem;
    padding-bottom: 1.5rem;
    overflow: visible;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem 1.5rem;
    margin-bottom: 0;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
    align-self: center;
    margin-right: auto;
    transform: translateY(8px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-flag-row {
    display: flex;
    align-items: center;
    gap: calc(0.65rem + 3px);
    margin: 0;
    font-size: clamp(2.65rem, 6.2vw, 4.25rem);
    line-height: 1.05;
    transform: translateY(-8px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-flag {
    display: block;
    width: auto;
    height: calc(0.68em + 5px);
    max-height: none;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transform: translateY(2px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-state {
    margin: 0 0 0 5px;
    font-family: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 1em;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #fff;
}

body.race-view-forecast.house-district-page .state-race-page-head--forecast-hero .rf-head-district-inline {
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: -0.03em;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-race {
    margin: 0.5rem 0 0;
    padding: 0;
    transform: translateY(-3px);
    font-family: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(0.95rem, 1.9vw, 1.18rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #94a3b8;
    text-align: left;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-mid {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0;
    padding-top: 0.85rem;
    padding-bottom: 0;
    text-align: left;
    transform: translateY(8px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-mid h2.state-race-rotating-headline {
    margin: 0;
    width: 100%;
    max-width: 100%;
    text-align: left;
    font-size: clamp(1.15rem, 2.15vw, 1.5rem);
    font-weight: 600;
    line-height: 1.22;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-mid .state-race-rotating-name,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-mid .state-race-rotating-pct {
    font-weight: 600;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-summary {
    flex-shrink: 0;
    align-self: flex-start;
    width: 100%;
    padding-top: calc(0.45rem + 10px);
    margin-top: 0.1rem;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-summary .state-race-page-more-toggle {
    margin: 0 !important;
    margin-top: 0 !important;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-summary .state-race-page-more-control--chevron-left {
    flex-direction: row;
    gap: 0.4rem;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-top,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photos {
    overflow: visible;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photos {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    align-self: center;
    transform: translateY(8px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
    width: clamp(118px, 14vw, 158px);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__frame {
    position: relative;
    width: 100%;
    height: clamp(148px, 17.5vw, 198px);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.65);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28%;
    min-height: 42px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.4rem 0.45rem 0.5rem;
    box-sizing: border-box;
    pointer-events: none;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__shade--d {
    background: linear-gradient(0deg,
            rgba(13, 102, 200, 0.98) 0%,
            rgba(13, 102, 200, 0.68) 42%,
            rgba(13, 102, 200, 0.2) 78%,
            transparent 100%);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__shade--r {
    background: linear-gradient(0deg,
            rgba(212, 47, 48, 0.98) 0%,
            rgba(212, 47, 48, 0.68) 42%,
            rgba(212, 47, 48, 0.2) 78%,
            transparent 100%);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__shade--ind {
    background: linear-gradient(0deg,
            rgba(135, 149, 166, 0.98) 0%,
            rgba(135, 149, 166, 0.64) 45%,
            rgba(135, 149, 166, 0.18) 78%,
            transparent 100%);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__last {
    font-family: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
    line-height: 1.1;
    text-align: center;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 60;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: 0.6rem 0.5rem 0.65rem;
    padding-left: calc(0.5rem + 1px);
    border-radius: 0;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: #0c1018;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo:hover .rf-head-photo__tip,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo:focus-within .rf-head-photo__tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.15rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-party {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin: 0.45rem 0 0.55rem;
    line-height: 1.15;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-party--d {
    color: #1181ff;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-party--r {
    color: #ff4142;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-party--ind {
    color: #8795a6;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-title {
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-years {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0.2rem 0 0;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip .ga-party-affil__arrow,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-title:empty,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip-years:empty {
    display: none !important;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-more,
body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-copy.rf-head-more {
    width: 100%;
    min-width: 0;
    margin-top: 0.85rem;
}

body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-more .state-race-page-more-panel {
    margin-top: 0.65rem;
}

/* Party-colored rule under full merged block */
body.race-view-forecast .state-race-page-head--forecast-hero[data-state-race-lead="D"] {
    border-bottom: 3px solid #1181ff;
}

body.race-view-forecast .state-race-page-head--forecast-hero[data-state-race-lead="R"] {
    border-bottom: 3px solid #ff4142;
}

body.race-view-forecast section.rf-legacy-hero-hidden {
    display: none !important;
}

@media (max-width: 900px) {
    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-top {
        flex-wrap: wrap;
        align-items: center;
    }

    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-identity {
        flex: 1 1 100%;
        margin-right: 0;
        align-self: flex-start;
    }

    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-mid {
        margin-top: 0.75rem;
        padding-top: 0;
    }

    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photos {
        order: 2;
    }
}

@media (max-width: 520px) {
    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photos {
        gap: 0.5rem;
    }

    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo {
        width: clamp(100px, 42vw, 130px);
    }

    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__frame {
        height: clamp(125px, 52vw, 165px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.race-view-forecast .state-race-page-head--forecast-hero .rf-head-photo__tip {
        transition: none;
    }
}
