/* ========================================
   MODERN FILTER BAR STYLES
   Professional & Friendly Design
   ======================================== */

/* Container */
.filter-bar-modern {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

/* Header Section */
.filter-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.title-icon {
    font-size: 1.8rem;
}

.filter-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

/* Filters Grid */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Filter Item Card */
.filter-item-card {
    position: relative;
}

/* Modern Filter Pill Button */
.filter-pill-modern {
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.filter-pill-modern:hover {
    border-color: var(--primary, #0ea5e9);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.filter-pill-modern:active {
    transform: translateY(0);
}

.pill-icon-modern {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pill-content-modern {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.pill-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.pill-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.pill-chevron-modern {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filter-pill-modern.active .pill-chevron-modern {
    transform: rotate(180deg);
}

/* Dropdown Panel Modern */
.dropdown-panel-modern {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.dropdown-panel-modern.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wide-panel-modern {
    min-width: 400px;
}

/* Dropdown Header Modern */
.dropdown-header-modern {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.header-icon {
    font-size: 1.2rem;
}

.counter-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Dropdown Body Modern */
.dropdown-body-modern {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

/* Option List Modern */
.option-list-modern {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-item-modern {
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.option-item-modern:hover {
    background: #f8fafc;
}

.option-item-modern.selected {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-left: 3px solid var(--primary, #0ea5e9);
    padding-left: 13px;
}

.option-icon {
    font-size: 1.2rem;
}

.option-text {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}

.option-item-modern.selected .option-text {
    color: var(--primary, #0ea5e9);
    font-weight: 600;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

/* Custom Checkbox Modern */
.custom-checkbox-modern {
    cursor: pointer;
    display: block;
}

.custom-checkbox-modern input {
    display: none;
}

.checkbox-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
}

.checkbox-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.custom-checkbox-modern input:checked+.checkbox-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-color: var(--primary, #0ea5e9);
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.checkbox-icon {
    font-size: 1.8rem;
}

.checkbox-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.custom-checkbox-modern input:checked+.checkbox-card .checkbox-text {
    color: var(--primary, #0ea5e9);
}

/* Radio Grid Modern */
.radio-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Custom Radio Modern */
.custom-radio-modern {
    cursor: pointer;
    display: block;
}

.custom-radio-modern input {
    display: none;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.radio-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.custom-radio-modern input:checked+.radio-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-color: var(--primary, #0ea5e9);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.radio-icon {
    font-size: 1.5rem;
}

.radio-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.custom-radio-modern input:checked+.radio-card .radio-text {
    color: var(--primary, #0ea5e9);
}

/* Chips Grid Modern */
.chips-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Chip Toggle Modern */
.chip-toggle-modern {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #475569;
}

.chip-toggle-modern:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.chip-toggle-modern.active {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-color: var(--primary, #0ea5e9);
    color: var(--primary, #0ea5e9);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.chip-icon {
    font-size: 1.3rem;
}

.chip-text {
    font-size: 0.9rem;
}

/* Warning Message Modern */
.warning-message-modern {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #92400e;
}

.warning-icon {
    font-size: 1.1rem;
}

/* Dropdown Footer Modern */
.dropdown-footer-modern {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.btn-close-modern {
    background: var(--primary, #0ea5e9);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-modern:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar-modern {
        padding: 20px;
    }

    .filter-title {
        font-size: 1.2rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .grid-3-col {
        grid-template-columns: 1fr;
    }

    .radio-grid-modern {
        grid-template-columns: 1fr;
    }

    .chips-grid-modern {
        grid-template-columns: 1fr;
    }

    .wide-panel-modern {
        min-width: auto;
    }
}

/* Animation for dropdown appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}