/* =========================================================
   D — Expanded Turnout Scope Controls
   ========================================================= */


/* =========================================================
   Hidden Collapsed
   ========================================================= */

.turnout-scope {
    display: none;
}


/* =========================================================
   Expanded D
   ========================================================= */

.dashboard-panel--turnout.dashboard-panel--expanded
.turnout-scope {
    display: block;

    flex: 0 0 auto;

    margin-bottom: 0.75rem;

    padding: 0.7rem;

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.55rem;
}


/* =========================================================
   Header
   ========================================================= */

.turnout-scope__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;

    margin-bottom: 0.55rem;
}


.turnout-scope__title {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.57rem;
    font-weight: 800;
}


.turnout-scope__subtitle {
    margin-top: 0.12rem;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.43rem;
}


.turnout-scope__context {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.47rem;
    font-weight: 750;

    white-space: nowrap;
}


/* =========================================================
   Controls
   ========================================================= */

.turnout-scope__controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;

    gap: 0.6rem;
}


.turnout-scope__group {
    display: grid;

    gap: 0.28rem;

    min-width: 0;
}


.turnout-scope__label {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.43rem;
    font-weight: 750;
}


/* =========================================================
   Segmented Control
   ========================================================= */

.turnout-scope__segmented {
    display: inline-flex;

    min-height: 34px;

    padding: 2px;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;
}


.turnout-scope__button {
    min-width: 72px;

    padding:
        0
        0.55rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: transparent;

    border: 0;
    border-radius: 0.3rem;

    cursor: pointer;

    font: inherit;
    font-size: 0.47rem;
    font-weight: 750;
}


.turnout-scope__button:hover {
    background: var(
        --dashboard-background,
        #f2f5f8
    );
}


.turnout-scope__button.is-active {
    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-background,
        #edf1f5
    );

    box-shadow:
        0 1px 2px
        rgba(
            15,
            23,
            42,
            0.08
        );
}


/* =========================================================
   Select / Readonly
   ========================================================= */

.turnout-scope__select,
.turnout-scope__readonly {
    height: 34px;

    min-width: 105px;

    padding:
        0
        0.55rem;

    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;

    font: inherit;
    font-size: 0.5rem;
    font-weight: 700;
}


.turnout-scope__select {
    outline: none;
}


.turnout-scope__readonly {
    display: flex;
    align-items: center;
}


/* =========================================================
   Compare
   ========================================================= */

.turnout-scope__compare {
    display: flex;
    align-items: flex-end;

    gap: 0.4rem;
}


.turnout-scope__vs {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 34px;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.45rem;
    font-weight: 800;
}


/* =========================================================
   Dark
   ========================================================= */

[data-theme="dark"]
.dashboard-panel--turnout.dashboard-panel--expanded
.turnout-scope {
    background: #111927;

    border-color: #2d394c;
}


[data-theme="dark"]
.turnout-scope__title {
    color: #f4f7fb;
}


[data-theme="dark"]
.turnout-scope__segmented,

[data-theme="dark"]
.turnout-scope__select,

[data-theme="dark"]
.turnout-scope__readonly {
    color: #f4f7fb;

    background: #172033;

    border-color: #344054;
}


[data-theme="dark"]
.turnout-scope__button {
    color: #aab4c3;
}


[data-theme="dark"]
.turnout-scope__button:hover,

[data-theme="dark"]
.turnout-scope__button.is-active {
    color: #f4f7fb;

    background: #253146;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .turnout-scope__header {
        align-items: flex-start;
        flex-direction: column;

        gap: 0.25rem;
    }


    .turnout-scope__controls {
        align-items: stretch;
        flex-direction: column;
    }


    .turnout-scope__segmented {
        width: 100%;
    }


    .turnout-scope__button {
        flex: 1;
    }


    .turnout-scope__compare {
        align-items: stretch;
        flex-direction: column;
    }


    .turnout-scope__vs {
        height: auto;

        justify-content: flex-start;
    }


    .turnout-scope__select,
    .turnout-scope__readonly {
        width: 100%;
    }

}