/* ---- Artist page event filters ---- */

.event-filters {
    position: relative;
}

/* Pills bar */
.filter-pills-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .25rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .85rem;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #312783;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    line-height: 1.4;
}

.filter-pill:hover {
    border-color: #312783;
}

.filter-pill[aria-expanded="true"] {
    background: #312783;
    border-color: #312783;
    color: #fff;
}

.filter-pill[aria-expanded="true"] .filter-pill-chevron {
    transform: rotate(180deg);
}

.filter-pill-chevron {
    flex-shrink: 0;
    transition: transform .2s;
}

.filter-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #51A3A3;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
}

.filter-pill[aria-expanded="true"] .filter-pill-badge {
    background: rgba(255,255,255,.3);
    color: #fff;
}

.filter-pill-clear {
    color: #687077;
    border-color: #e3e5e6;
    font-weight: 400;
}

.filter-pill-clear:hover {
    border-color: #b0b5bb;
    color: #312783;
}

.filter-result-count {
    font-size: .8125rem;
    color: #687077;
    margin-left: .25rem;
}

/* Dropdown wrapper — anchors the panel */
.filter-dropdown {
    position: relative;
}

/* Dropdown panel */
.filter-panel {
    position: absolute;
    top: calc(100% + .3rem);
    left: 0;
    z-index: 200;
    min-width: 260px;
    max-width: 340px;
    background: #fff;
    border: 1.5px solid #e3e5e6;
    border-radius: .5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
}

/* Search input row */
.filter-search-wrap {
    padding: .6rem .75rem;
    border-bottom: 1px solid #e3e5e6;
    flex-shrink: 0;
}

.filter-search-input {
    width: 100%;
    padding: 12px 12px 12px 2rem !important;
    border: 1.5px solid #d1d5db;
    border-radius: .375rem;
    font-size: .8125rem;
    line-height: 1.4;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 20 20' fill='%23687077'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat .5rem center;
    transition: border-color .15s, background-color .15s;
    -webkit-appearance: none;
}

.filter-search-input:focus {
    outline: none;
    border-color: #312783;
    background-color: #fff;
}

.filter-panel-inner {
    padding: .75rem 1rem;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-panel-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #687077;
    margin: 0 0 .5rem;
}

/* No results message */
.filter-no-results {
    font-size: .875rem;
    color: #687077;
    padding: .15rem .5rem;
    display: none;
    margin: 0;
}

.filter-panel-options {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.filter-panel-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .875rem;
    color: #4C5C68;
    cursor: pointer;
    user-select: none;
    padding: .2rem .4rem;
    border-radius: .375rem;
    border: 1px solid transparent;
    transition: background .12s, border-color .12s;
}

.filter-panel-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.filter-panel-label input[type="checkbox"] {
    accent-color: #312783;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.filter-panel-label:has(input:checked) {
    background: #eef0fb;
    border-color: #312783;
    color: #312783;
    font-weight: 500;
}

/* Backdrop */
.filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
}

/* Drag handle (visible on mobile only) */
.filter-panel-drag-handle {
    display: none;
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: .65rem auto .15rem;
    flex-shrink: 0;
}

/* Close button (visible on mobile only) */
.filter-panel-close {
    display: none;
    width: 100%;
    padding: .875rem 1rem;
    background: #312783;
    color: #fff;
    border: none;
    border-top: 1px solid #e3e5e6;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

/* Mobile: bottom sheet */
@media (max-width: 575.98px) {
    .filter-panel {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-width: 100%;
        width: 100%;
        min-width: 0;
        border-radius: 1.25rem 1.25rem 0 0;
        margin: 0;
        max-height: 60vh;
        z-index: 200;
    }

    .filter-panel-inner {
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }

    .filter-panel-drag-handle {
        display: block;
    }

    .filter-panel-close {
        display: block;
    }

    .filter-panel-label {
        font-size: .9375rem;
        padding: .35rem .5rem;
    }

    .filter-search-input {
        font-size: 1rem;
        padding: 12px 12px 12px 2rem !important;
    }
}

/* Empty state when filters yield no results */
.filter-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
}

.filter-empty-state-message {
    font-size: .9375rem;
    color: #687077;
    margin: 0 0 1rem;
}

.filter-empty-state-reset {
    display: inline-block;
    padding: .5rem 1.25rem;
    font-size: .875rem;
    font-weight: 600;
    color: #312783;
    background: transparent;
    border: 1.5px solid #312783;
    border-radius: .375rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.filter-empty-state-reset:hover {
    background: #312783;
    color: #fff;
}
