/* Hall of Fame — панель фильтров */
.hof-filters-panel {
    --hof-f-accent: #ff9800;
    --hof-f-border: var(--border-color, #dee2e6);
    margin-bottom: 20px;
    padding: 14px 16px 12px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--hof-f-accent) 22%, var(--hof-f-border));
    background:
        radial-gradient(ellipse 90% 70% at 0% 0%, color-mix(in srgb, var(--hof-f-accent) 10%, transparent), transparent 55%),
        var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.hof-filters-panel--players {
    --hof-f-accent: #7c4dff;
}

.hof-filters-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--hof-f-accent) 12%, var(--hof-f-border));
}

.hof-filters-panel__eyebrow {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hof-f-accent);
}

.hof-filters-panel__eyebrow-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.hof-filters-panel__reset {
    appearance: none;
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hof-f-accent);
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.15s;
}

.hof-filters-panel__reset:hover {
    background: color-mix(in srgb, var(--hof-f-accent) 10%, var(--card-bg));
    text-decoration: underline;
}

.hof-filters-panel__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.hof-filters-panel__grid--with-coaches {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, 1.2fr);
}

.hof-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.hof-filter-field--types {
    position: relative;
    grid-column: span 1;
}

.hof-filter-field__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--text-color) 62%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hof-filter-field__select {
    width: 100%;
    min-width: 0;
    padding: 9px 32px 9px 11px;
    border: 1px solid color-mix(in srgb, var(--hof-f-accent) 20%, var(--hof-f-border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--hof-f-accent) 4%, var(--card-bg));
    color: var(--text-color);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--hof-f-accent) 70%, var(--text-color)) 50%),
        linear-gradient(135deg, color-mix(in srgb, var(--hof-f-accent) 70%, var(--text-color)) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 11px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.hof-filter-field__select:focus {
    outline: none;
    border-color: var(--hof-f-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hof-f-accent) 16%, transparent);
}

.hof-filter-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--hof-f-accent) 20%, var(--hof-f-border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--hof-f-accent) 4%, var(--card-bg));
    color: var(--text-color);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.15s, background-color 0.15s;
}

.hof-filter-type-btn:hover,
.hof-filter-type-btn[aria-expanded="true"] {
    border-color: var(--hof-f-accent);
    background: color-mix(in srgb, var(--hof-f-accent) 10%, var(--card-bg));
}

.hof-filter-type-btn__left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hof-filter-type-btn__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hof-filter-type-badge {
    flex-shrink: 0;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hof-f-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.hof-filter-type-arrow {
    flex-shrink: 0;
    font-size: 0.62rem;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

.hof-filter-type-arrow.is-open {
    transform: rotate(180deg);
}

.hof-filter-type-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 120;
    max-height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--card-bg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transition: max-height 0.25s ease, border-color 0.2s;
}

.hof-filter-type-menu.is-open {
    max-height: 320px;
    border-color: color-mix(in srgb, var(--hof-f-accent) 24%, var(--hof-f-border));
}

.hof-filter-type-menu__inner {
    padding: 10px 12px;
    max-height: 280px;
    overflow-y: auto;
}

.hof-filter-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-color);
    transition: background-color 0.12s;
}

.hof-filter-type-option:hover {
    background: color-mix(in srgb, var(--hof-f-accent) 8%, var(--card-bg));
}

.hof-filter-type-option input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--hof-f-accent);
    cursor: pointer;
}

.hof-filter-field--coaches {
    justify-content: flex-end;
}

.hof-filter-coaches {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--hof-f-accent) 16%, var(--hof-f-border));
    background: color-mix(in srgb, var(--hof-f-accent) 4%, var(--card-bg));
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
}

.hof-filter-coaches input {
    width: 16px;
    height: 16px;
    accent-color: var(--hof-f-accent);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .hof-filters-panel__grid,
    .hof-filters-panel__grid--with-coaches {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hof-filter-field--types {
        grid-column: span 2;
    }

    .hof-filter-field--coaches {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .hof-filters-panel {
        padding: 12px;
    }

    .hof-filters-panel__grid,
    .hof-filters-panel__grid--with-coaches {
        grid-template-columns: 1fr;
    }

    .hof-filter-field--types,
    .hof-filter-field--coaches {
        grid-column: span 1;
    }

    .hof-filter-type-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }

    .hof-filter-type-menu.is-open {
        max-height: min(50vh, 360px);
    }
}
