/* Shared player, team and coach game-log filters. Desktop stays expanded. */
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-toggle { display: none; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters { display: block; margin: 0; min-width: 0; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filters-grid {
    display: grid;
    grid-template-columns: repeat(var(--game-log-filter-columns, 3), minmax(0, 1fr));
    gap: 14px 16px;
    margin: 0;
    padding: 0;
}
:is(#team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters { margin-bottom: 18px; }
#team-profile.profile-refresh #splits .filters-grid--team { --game-log-filter-columns: 4; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filter-actions { justify-content: flex-end; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filters-actions { display: flex; flex-direction: row; gap: 6px; flex-wrap: nowrap; width: 100%; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filters-actions button { flex: 1; min-width: 0; min-height: 40px; padding: 8px; border-radius: 7px; font: inherit; font-size: .84rem; font-weight: 600; justify-content: center; box-shadow: none; transform: none; }

/* Inline statistic condition: a single desktop row and two compact mobile rows. */
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-section {
    display: block;
    margin: 0 0 18px;
    padding: 0;
    min-width: 0;
    border: 1px solid var(--profile-line);
    border-left: 3px solid var(--profile-accent-background);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 48px;
    margin: 0;
    padding: 0 12px;
    gap: 8px;
    border-bottom: 1px solid var(--profile-line);
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-title {
    min-width: 0;
    margin: 0;
    color: var(--profile-ink);
    font-size: .92rem;
    font-weight: 600;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-heading { display: inline-flex; align-items: center; gap: 10px; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-toggle { display: none; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--profile-muted);
    font: inherit;
    font-size: .78rem;
    font-weight: 500;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-controls { min-height: 0; padding: 12px; gap: 10px; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-input-group {
    display: grid;
    grid-template-columns: auto minmax(110px, 1fr) minmax(110px, .65fr) 64px 76px;
    align-items: center;
    gap: 8px;
    margin: 0;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-label {
    width: auto;
    color: var(--profile-ink);
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.4;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) :is(.stat-filter-select, .stat-filter-operator, .stat-filter-value) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--profile-line);
    border-radius: 7px;
    background: #fff;
    color: var(--profile-ink);
    font: inherit;
    font-size: .84rem;
    box-shadow: none;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) :is(.stat-filter-apply, .stat-filter-clear) {
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 7px;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    box-shadow: none;
    transform: none;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-active { margin: 0; gap: 8px; flex-wrap: wrap; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-badge { max-width: 100%; border-radius: 6px; padding: 0 0 0 10px; }
#team-profile.profile-refresh #splits .stat-filter-badge { padding: 8px 10px; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-remove { flex: 0 0 40px; min-height: 40px; margin: 0; color: inherit; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-section :is(button, select, input):focus-visible {
    outline: 2px solid var(--profile-accent);
    outline-offset: 2px;
    box-shadow: none;
}
@media (max-width: 820px) {
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-section { border-left-width: 1px; border-left-color: var(--profile-line); margin-bottom: 14px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-header { padding: 0 8px 0 12px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-title { flex: 1; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-heading { display: none; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        padding: 8px 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--profile-ink);
        font: inherit;
        font-size: .88rem;
        text-align: left;
        cursor: pointer;
    }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-toggle::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-chevron { position: absolute; right: 12px; pointer-events: none; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-toggle[aria-expanded="true"] .stat-filter-chevron { transform: rotate(180deg); }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-help { margin-right: 26px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-help-btn { position: relative; z-index: 1; width: 44px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-help-btn span { display: none; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-section:not(.is-expanded) .stat-filter-controls { display: none; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-section:not(.is-expanded) .stat-filter-header { border-bottom: 0; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-controls { padding: 10px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-input-group { grid-template-columns: minmax(0, 1fr) 54px 56px; gap: 8px 6px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) :is(.stat-filter-label, .stat-filter-select) { grid-column: 1 / -1; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) :is(.stat-filter-select, .stat-filter-operator, .stat-filter-value) { min-height: 44px; padding: 8px 5px; font-size: 16px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) :is(.stat-filter-apply, .stat-filter-clear) { min-height: 44px; padding: 8px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .stat-filter-remove { min-height: 44px; flex-basis: 44px; }
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filter-group { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filter-label {
    margin: 0;
    color: var(--profile-muted);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filter-select.small {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--profile-line);
    border-radius: 8px;
    background-color: #fff;
    color: var(--profile-ink);
    font: inherit;
    font-size: .85rem;
    line-height: 1.3;
    box-shadow: none;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filter-select.small:focus-visible {
    outline: 2px solid var(--profile-accent);
    outline-offset: 2px;
}
:is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .profile-recording-note {
    margin: 14px 0 18px;
    color: var(--profile-muted);
    font-size: .75rem;
    line-height: 1.5;
}
@media (max-width: 820px) {
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        border: 1px solid var(--profile-line);
        border-radius: 8px;
        background: #fff;
        color: var(--profile-ink);
        font: inherit;
        font-size: .88rem;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-icon { color: var(--profile-accent); flex: 0 0 20px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-chevron { margin-left: auto; flex: 0 0 18px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-toggle[aria-expanded="true"] .game-log-filters-chevron { transform: rotate(180deg); }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-toggle:focus-visible { outline: 2px solid var(--profile-accent); outline-offset: 2px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .game-log-filters-toggle[aria-expanded="false"] + .filters-grid { display: none; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
        padding-top: 12px;
    }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filter-select.small { min-height: 44px; padding: 8px 6px; font-size: 16px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .filters-actions button { min-height: 44px; }
    :is(#player-profile, #team-profile, #coach-profile).profile-refresh :is(#game-log, #splits) .profile-recording-note { margin: 10px 0 14px; font-size: .72rem; }
}
