/* Generic Filter Styles */

.filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: var(--tlm-radius-md-px, 8px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.filter-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .filter-header:hover {
        background-color: #f9fafb;
    }

    .filter-header:focus {
        outline: none;
    }

.filter-title {
    font-size: 17px;
        font-weight: 600;
    color: #1f2937;
    margin: 10px 0 10px 0;
}

.chevron {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: transform 0.25s ease;
    }

    .chevron.open {
        transform: rotate(180deg);
    }

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .filter-content.open {
        max-height: 500px;
}

.filter-body {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.filter-search-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border: 1px solid #d1d5db !important;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937 !important;
    background: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-transform: none !important;
    font-family: 'Roboto', sans-serif !important;
}

.filter-search-input::placeholder {
    color: #9ca3af;
}

    .filter-search-input:focus {
        outline: none !important;
        border-color: #074d78 !important;
        background: #ffffff !important;
        box-shadow: 0 0 0 1px #074d78 !important;
    }

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
}

.checkbox-item {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #1f2937;
}

    .checkbox-item input[type="checkbox"] {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        opacity: 0;
        cursor: pointer;
        margin: 0;
        z-index: 1;
    }

    .checkbox-item label {
        position: relative;
        padding-left: 26px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.3;
    cursor: pointer;
        user-select: none;
        display: inline-flex;
        align-items: center;
    }

    .checkbox-item label::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        border: 1px solid #074d78;
    border-radius: 3px;
        background-color: #ffffff;
        transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
        box-sizing: border-box;
}

    .checkbox-item label::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 50%;
        width: 5px;
        height: 9px;
        border: solid transparent;
        border-width: 0 2px 2px 0;
        transform: translateY(-55%) rotate(45deg);
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .checkbox-item input[type="checkbox"]:checked + label::before {
        background-color: #074d78;
        border-color: #074d78;
        /*box-shadow: 0 0 0 1px rgba(7, 77, 120, 0.3);*/
    }

    .checkbox-item input[type="checkbox"]:checked + label::after {
        border-color: #ffffff;
        opacity: 1;
        box-shadow: none;
    }

    .checkbox-item.selected label {
        font-weight: 500;
    }

    .checkbox-item input[type="checkbox"]:focus-visible + label::before {
        outline: 2px solid rgba(7, 77, 120, 0.6);
        outline-offset: 2px;
    }

.no-results {
    text-align: center;
    padding: 16px 8px;
    font-size: 14px;
    color: #9ca3af;
    }

/* Active Filters */
.active-filters {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-chip {
    background: #e5edff;
    color: #1d4ed8;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.remove-chip {
    background: #ffffff;
    color: #1d4ed8;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

.clear-filters-btn {
    width: 100%;
    padding: 8px;
    background: #ffffff;
    color: #1d4ed8;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .clear-filters-btn:hover {
        background: #1d4ed8;
        color: #ffffff;
    }
