/* Shared public statistics scope selector. */

[data-goat-stats-values] {
    transition: opacity 140ms ease;
}

[data-goat-stats-values][aria-busy="true"] {
    opacity: 0.84;
}

[data-stats-scope-root][aria-busy="true"] .stats-scope-selector__trigger {
    cursor: progress;
}

.stats-scope-selector {
    position: relative;
    z-index: 20;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 210px;
    color: #fff;
}

.stats-scope-selector .stats-scope-selector__label {
    color: rgba(255, 255, 255, 0.58);
    font-family: var(--font-heading, 'Oswald', sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

.stats-scope-selector__details {
    position: relative;
    width: 100%;
}

.stats-scope-selector__trigger,
.stats-scope-selector .stats-scope-selector__static {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 12px;
    color: #fff;
    background: rgba(7, 8, 12, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    font-family: var(--font-heading, 'Oswald', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.stats-scope-selector__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 14px;
    cursor: pointer;
    list-style: none;
}

.stats-scope-selector__trigger > span,
.stats-scope-selector__option > span:last-child {
    display: inline;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: none;
}

.stats-scope-selector__trigger::-webkit-details-marker {
    display: none;
}

.stats-scope-selector__trigger::marker {
    display: none;
    content: '';
}

.stats-scope-selector__trigger:hover,
.stats-scope-selector__trigger:focus-visible {
    border-color: rgba(212, 175, 55, 0.72);
    outline: none;
    background: #11131a;
}

.stats-scope-selector__trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.stats-scope-selector__trigger svg {
    width: 12px;
    flex: 0 0 12px;
    color: #d4af37;
    transition: transform 160ms ease;
}

.stats-scope-selector__details[open] .stats-scope-selector__trigger svg {
    transform: rotate(180deg);
}

.stats-scope-selector__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 30;
    overflow: hidden;
    padding: 6px;
    border: 1px solid rgba(212, 175, 55, 0.26);
    border-radius: 12px;
    background: #0b0c11;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.44);
}

.stats-scope-selector .stats-scope-selector__option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-heading, 'Oswald', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    text-decoration: none;
}

.stats-scope-selector__option:hover,
.stats-scope-selector__option:focus-visible {
    color: #fff;
    outline: none;
    background: rgba(255, 255, 255, 0.07);
}

.stats-scope-selector__option:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.48);
}

.stats-scope-selector__option.is-active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.stats-scope-selector .stats-scope-selector__check {
    display: inline;
    color: #d4af37;
    font: inherit;
    letter-spacing: inherit;
    text-align: center;
    text-transform: none;
}

.stats-scope-selector .stats-scope-selector__static {
    display: flex;
    align-items: center;
    padding: 11px 14px;
}

.stats-scope-selector--player {
    min-width: 190px;
}

@media (max-width: 720px) {
    .stats-scope-selector {
        width: 100%;
        min-width: 0;
    }

    .stats-scope-selector__menu {
        right: 0;
        left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-goat-stats-values] {
        transition: none;
    }
}
