/* ============================================================
   NFL MODEL BOARD — PBP MODULE
   STANDARD + ADVANCED PASS VIEW
   ============================================================ */


/* ============================================================
   SHARED CONSOLE
   ============================================================ */

.pbp-console {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pbp-narrative-card {
    margin: 0 0 14px;
    padding: 16px 18px;
    border: 1px solid rgba(85, 217, 255, .22);
    border-radius: 14px;
    background: rgba(85, 217, 255, .055);
}

.pbp-narrative-label {
    color: #55d9ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
}

.pbp-narrative-card p {
    margin: 9px 0 0;
    color: #d5dbe5;
    font-size: 12px;
    line-height: 1.55;
}


.pbp-control-deck {
    padding: 12px;

    border-radius: 15px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.06);
}


.pbp-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 9px;

    flex-wrap: wrap;
}


.pbp-control-row:last-child {
    margin-bottom: 0;
}


.pbp-control-label {
    color: var(--muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .12em;
}


.pbp-segment {
    display: flex;

    padding: 3px;

    border-radius: 10px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.05);
}


.pbp-segment button {
    border: 0;

    padding: 7px 10px;

    border-radius: 7px;

    background: transparent;
    color: var(--muted);

    font-family: inherit;

    font-size: 8px;
    font-weight: 800;

    cursor: pointer;

    transition:
        color .14s ease,
        background .14s ease,
        box-shadow .14s ease;
}


.pbp-segment button.active {
    color: #07120a;

    background:
        linear-gradient(
            135deg,
            #69f08f,
            #3fd76a
        );

    box-shadow:
        0 4px 14px
        rgba(83,226,124,.20);
}


.pbp-view-row {
    padding-bottom: 10px;
    margin-bottom: 10px;

    border-bottom:
        1px solid rgba(255,255,255,.06);
}


.pbp-view-segment button.active {
    color: #07120a;

    background:
        linear-gradient(
            135deg,
            #f5f7f5,
            #b9c3bd
        );

    box-shadow:
        0 5px 18px
        rgba(255,255,255,.10);
}


.pbp-matchup-title {
    padding: 5px 2px 0;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .06em;
}


.pbp-matchup-sub {
    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.45;
}


.pbp-governance {
    color: var(--muted);

    font-size: 8px;

    line-height: 1.45;

    text-align: center;
}


.pbp-loading {
    min-height: 250px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    color: var(--muted);

    font-size: 10px;

    text-align: center;
}


/* ============================================================
   STANDARD VIEW
   ============================================================ */

.pbp-standard-map-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 12px;
}


.pbp-standard-card {
    border-radius: 18px;

    overflow: hidden;

    background:
        rgba(4,17,9,.84);

    border:
        1px solid rgba(255,255,255,.08);
}


.pbp-standard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 12px 13px;

    border-bottom:
        1px solid rgba(255,255,255,.06);
}


.pbp-standard-header strong {
    font-size: 11px;
}


.pbp-standard-header span {
    color: var(--muted);

    font-size: 8px;
}


.pbp-standard-body {
    padding: 12px;

    display: flex;
    flex-direction: column;

    gap: 7px;
}


.pbp-standard-row {
    display: grid;

    grid-template-columns:
        minmax(100px, 1fr)
        minmax(90px, 2.2fr)
        52px;

    align-items: center;

    gap: 8px;
}


.pbp-standard-label {
    color: rgba(255,255,255,.72);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .05em;
}


.pbp-standard-track {
    height: 22px;

    overflow: hidden;

    border-radius: 7px;

    background:
        rgba(255,255,255,.045);

    border:
        1px solid rgba(255,255,255,.035);
}


.pbp-standard-fill {
    height: 100%;

    min-width: 2px;

    border-radius: 6px;

    background:
        linear-gradient(
            90deg,
            rgba(83,226,124,.34),
            rgba(83,226,124,.90)
        );

    box-shadow:
        0 0 14px
        rgba(83,226,124,.15);
}


.pbp-standard-value {
    font-family: var(--mono);

    font-size: 10px;
    font-weight: 800;

    text-align: right;
}


.pbp-standard-def {
    margin-top: 2px;

    color: var(--muted);

    font-size: 7px;
}


/* ============================================================
   ADVANCED PASS VIEW
   ============================================================ */

.pbp-advanced-map {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px;
    background: rgba(4,13,8,.96);
}

.pbp-quadrant-field {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    padding: 22px 18px 54px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 79px,
            rgba(255,255,255,.075) 79px,
            rgba(255,255,255,.075) 80px
        ),
        linear-gradient(180deg, #123b21 0%, #092b17 100%);
}

.pbp-quadrant-grid {
    position: relative;
    z-index: 2;
    min-height: 390px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pbp-quadrant-zone {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-right: 1px dashed rgba(255,255,255,.12);
    border-bottom: 1px dashed rgba(255,255,255,.12);
    background: var(--zone-color);
}

.pbp-quadrant-zone:nth-child(3n) {
    border-right: 0;
}

.pbp-quadrant-zone:nth-child(n + 4) {
    border-bottom: 0;
}

.pbp-map-dot {
    position: absolute;
    z-index: 2;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color);
    box-shadow: 0 0 9px var(--dot-color);
    transform: translate(-50%, -50%);
}

.pbp-quadrant-zone .pbp-zone-caption {
    position: absolute;
    z-index: 4;
    right: 9px;
    bottom: 8px;
    left: 9px;
    padding: 7px;
    border-radius: 8px;
    background: rgba(2,8,5,.68);
}

.pbp-line-of-scrimmage {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    z-index: 3;
    padding-top: 6px;
    border-top: 2px solid rgba(255,255,255,.46);
    color: rgba(255,255,255,.52);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .18em;
    text-align: center;
}

.pbp-advanced-shell {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


.pbp-possession-selector {
    display: flex;

    gap: 4px;

    padding: 4px;

    border-radius: 12px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.055);
}


.pbp-possession-selector button {
    flex: 1;

    border: 0;

    padding: 10px;

    border-radius: 8px;

    background: transparent;
    color: var(--muted);

    font-family: inherit;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .07em;

    cursor: pointer;
}


.pbp-possession-selector button.active {
    color: var(--text);

    background:
        rgba(255,255,255,.095);

    box-shadow:
        inset 0 0 0 1px
        rgba(255,255,255,.07);
}

@media (max-width: 720px) {
    .pbp-quadrant-field {
        min-height: 390px;
        padding: 14px 10px 48px;
    }

    .pbp-quadrant-grid {
        min-height: 320px;
    }

    .pbp-quadrant-zone .pbp-zone-caption {
        right: 5px;
        bottom: 5px;
        left: 5px;
        padding: 5px;
    }

    .pbp-map-dot {
        width: 6px;
        height: 6px;
    }
}


.pbp-advanced-card {
    overflow: hidden;

    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(8,26,14,.93),
            rgba(4,13,8,.96)
        );

    border:
        1px solid rgba(255,255,255,.09);

    box-shadow:
        0 24px 50px rgba(0,0,0,.28);
}


.pbp-advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;

    padding: 14px 16px;

    border-bottom:
        1px solid rgba(255,255,255,.065);
}


.pbp-advanced-title {
    font-size: 12px;
    font-weight: 800;
}


.pbp-advanced-subtitle {
    margin-top: 3px;

    color: var(--muted);

    font-size: 8px;
}


.pbp-advanced-period {
    flex-shrink: 0;

    color: var(--green);

    font-family: var(--mono);

    font-size: 9px;
    font-weight: 800;
}


/* ============================================================
   FIELD
   ============================================================ */

.pbp-pass-field {
    position: relative;

    min-height: 540px;

    overflow: hidden;

    padding:
        38px 26px 52px;

    background:
        linear-gradient(
            180deg,
            #174f27 0%,
            #0e3c1c 48%,
            #092b15 100%
        );
}


.pbp-pass-field::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: .28;

    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 53px,
            rgba(255,255,255,.20) 53px,
            rgba(255,255,255,.20) 55px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(33.333% - 1px),
            rgba(255,255,255,.05)
                calc(33.333% - 1px),
            rgba(255,255,255,.05)
                33.333%
        );
}


.pbp-pass-field::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 45px;

    height: 2px;

    background:
        rgba(255,255,255,.50);

    box-shadow:
        0 0 12px
        rgba(255,255,255,.12);
}


.pbp-field-endzone {
    position: absolute;

    left: 0;
    right: 0;
    top: 0;

    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    color:
        rgba(255,255,255,.34);

    background:
        rgba(0,0,0,.16);

    border-bottom:
        1px solid rgba(255,255,255,.12);

    font-size: 7px;
    font-weight: 800;

    letter-spacing: .30em;
}


.pbp-pass-zone-grid {
    position: relative;
    z-index: 2;

    min-height: 430px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    grid-template-rows:
        1.05fr .95fr;

    gap: 13px;
}


.pbp-heat-zone {
    position: relative;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    justify-content: flex-end;

    padding: 13px;

    border-radius: 42% 42% 22% 22% / 30% 30% 20% 20%;

    background:
        radial-gradient(
            ellipse at 50% 62%,
            rgba(
                105,
                240,
                143,
                var(--heat-strong)
            ) 0%,
            rgba(
                83,
                226,
                124,
                var(--heat-mid)
            ) 38%,
            rgba(
                83,
                226,
                124,
                var(--heat-soft)
            ) 68%,
            rgba(
                83,
                226,
                124,
                0
            ) 100%
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            var(--def-outline)
        );

    box-shadow:
        inset 0 0 42px
            rgba(
                83,
                226,
                124,
                var(--heat-soft)
            ),
        0 0 24px
            rgba(
                83,
                226,
                124,
                var(--heat-soft)
            );

    cursor: pointer;

    transition:
        transform .16s ease,
        border-color .16s ease,
        filter .16s ease;
}


.pbp-heat-zone:hover {
    transform: scale(1.018);

    filter: brightness(1.08);
}


.pbp-heat-zone.selected {
    transform: scale(1.022);

    border-color:
        rgba(255,255,255,.90);

    box-shadow:
        inset 0 0 50px
            rgba(83,226,124,.25),
        0 0 28px
            rgba(83,226,124,.32),
        0 0 0 2px
            rgba(255,255,255,.30);
}


.pbp-zone-caption {
    position: relative;
    z-index: 4;

    text-shadow:
        0 2px 8px rgba(0,0,0,.75);
}


.pbp-zone-location {
    color:
        rgba(255,255,255,.74);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .09em;
}


.pbp-zone-usage {
    margin-top: 4px;

    font-family: var(--mono);

    font-size: 23px;
    font-weight: 900;

    letter-spacing: -.04em;
}


.pbp-zone-defense {
    margin-top: 3px;

    color:
        rgba(255,255,255,.62);

    font-size: 8px;
}


.pbp-backfield {
    position: absolute;

    z-index: 4;

    left: 50%;
    bottom: 12px;

    transform:
        translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 4px;
}


.pbp-qb-dot {
    width: 17px;
    height: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #061008;

    background:
        #f4f7f5;

    box-shadow:
        0 0 18px
        rgba(255,255,255,.28);

    font-size: 6px;
    font-weight: 900;
}


.pbp-los-label {
    color:
        rgba(255,255,255,.45);

    font-size: 6px;
    font-weight: 800;

    letter-spacing: .13em;
}


/* ============================================================
   ADVANCED LEGEND
   ============================================================ */

.pbp-advanced-legend {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;

    padding: 10px 14px;

    color: var(--muted);

    background:
        rgba(255,255,255,.025);

    border-top:
        1px solid rgba(255,255,255,.05);

    font-size: 7px;
}


.pbp-legend-item {
    display: inline-flex;
    align-items: center;

    gap: 6px;
}


.pbp-legend-fill {
    width: 22px;
    height: 8px;

    border-radius: 8px;

    background:
        linear-gradient(
            90deg,
            rgba(83,226,124,.12),
            rgba(83,226,124,.90)
        );
}


.pbp-legend-border {
    width: 22px;
    height: 8px;

    border-radius: 5px;

    border:
        1px solid
        rgba(255,255,255,.65);
}


/* ============================================================
   DETAIL PANEL
   ============================================================ */

.pbp-detail-panel {
    padding: 15px;

    border-radius: 15px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.06);
}


.pbp-detail-empty {
    color: var(--muted);

    font-size: 10px;

    text-align: center;
}


.pbp-detail-title {
    font-size: 13px;
    font-weight: 800;
}


.pbp-detail-subtitle {
    margin-top: 4px;

    color: var(--muted);

    font-size: 8px;
}


.pbp-detail-grid {
    margin-top: 11px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 7px;
}


.pbp-detail-metric {
    padding: 10px;

    border-radius: 10px;

    text-align: center;

    background:
        rgba(255,255,255,.035);
}


.pbp-detail-metric label {
    display: block;

    color: var(--muted);

    font-size: 7px;
    font-weight: 800;

    letter-spacing: .08em;
}


.pbp-detail-metric strong {
    display: block;

    margin-top: 5px;

    font-family: var(--mono);

    font-size: 12px;
}


/* ============================================================
   ADVANCED RUSH PLACEHOLDER — TEMPORARY
   ============================================================ */

.pbp-advanced-pending {
    min-height: 420px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 30px;

    border-radius: 20px;

    text-align: center;

    background:
        linear-gradient(
            180deg,
            rgba(9,35,18,.84),
            rgba(4,14,8,.90)
        );

    border:
        1px solid rgba(255,255,255,.08);
}


.pbp-advanced-pending strong {
    font-size: 18px;
}


.pbp-advanced-pending span {
    max-width: 370px;

    margin-top: 8px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.5;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .pbp-standard-map-grid {
        grid-template-columns: 1fr;
    }


    .pbp-pass-field {
        min-height: 470px;

        padding:
            36px 12px 52px;
    }


    .pbp-pass-zone-grid {
        min-height: 375px;

        gap: 7px;
    }


    .pbp-heat-zone {
        padding: 8px;

        border-radius:
            38% 38% 20% 20% /
            24% 24% 18% 18%;
    }


    .pbp-zone-location {
        font-size: 6px;
    }


    .pbp-zone-usage {
        font-size: 17px;
    }


    .pbp-zone-defense {
        font-size: 6px;
    }


    .pbp-detail-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .pbp-control-row {
        align-items: flex-start;

        flex-direction: column;
    }


    .pbp-segment {
        max-width: 100%;

        overflow-x: auto;
    }


    .pbp-segment button {
        flex-shrink: 0;
    }


    .pbp-advanced-legend {
        gap: 10px;

        flex-wrap: wrap;
    }

}


/* Forced mobile development preview */

body.force-mobile .pbp-standard-map-grid {
    grid-template-columns: 1fr;
}


body.force-mobile .pbp-pass-field {
    min-height: 470px;

    padding:
        36px 12px 52px;
}


body.force-mobile .pbp-pass-zone-grid {
    min-height: 375px;

    gap: 7px;
}


body.force-mobile .pbp-detail-grid {
    grid-template-columns:
        repeat(2, 1fr);
}
