﻿.mhg-team-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2.5rem auto 3rem;
    position: relative;
    z-index: 20;
}

.mhg-team-filter__dropdown {
    position: relative;
}

.mhg-team-filter__button {
    min-width: 150px;
    height: 44px;
    padding: 0 1rem;
    background: #ffffff;
    border: 1px solid #d5d9df;
    border-radius: 8px;
    color: #1f2933;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .mhg-team-filter__button:hover,
    .mhg-team-filter__button[aria-expanded="true"] {
        border-color: #d5001c;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

.mhg-team-filter__icon {
    color: #374151;
    font-size: 16px;
}

.mhg-team-filter__chevron {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.mhg-team-filter__button[aria-expanded="true"] .mhg-team-filter__chevron {
    transform: rotate(180deg);
}

.mhg-team-filter__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 315px;
    max-height: 330px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e3e6ea;
    border-radius: 4px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    display: none;
    z-index: 999;
}

.mhg-team-filter__dropdown.is-open .mhg-team-filter__menu {
    display: block;
}

.mhg-team-filter__option {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    color: #263238;
    font-size: 15px;
    line-height: 1.35;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .mhg-team-filter__option:hover {
        background-color: #f8f9fb;
        color: #d5001c;
    }

    .mhg-team-filter__option.is-selected {
        color: #d5001c;
    }

.mhg-team-filter__check {
    display: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #d5001c;
}

.mhg-team-filter__option.is-selected .mhg-team-filter__check {
    display: inline;
}

.mhg-team-filter__empty {
    text-align: center;
    margin: 2rem auto;
    color: #6b7280;
    font-size: 18px;
}

[data-team-card="true"] {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

    [data-team-card="true"].mhg-team-filter-hidden {
        display: none !important;
    }

    [data-team-card="true"].mhg-team-filter-dimmed {
        opacity: 0.16;
        filter: grayscale(1);
    }

@media (max-width: 767px) {
    .mhg-team-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .mhg-team-filter__button {
        width: 100%;
    }

    .mhg-team-filter__dropdown {
        width: 100%;
    }

    .mhg-team-filter__menu {
        width: 100%;
        position: relative;
        top: 0;
        margin-top: 0.5rem;
    }
}
