/* ==========================================================================
   BuyRapido Smart AJAX Filter - Premium Styling
   ========================================================================== */

/* Main Wrapper */
.br-smart-filter-wrapper {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0,0,0,0.02);
    font-family: 'Inter', 'Roboto', sans-serif;
    transition: all 0.3s ease;
}

.br-smart-filter-wrapper:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 2px 5px rgba(0,0,0,0.03);
}

/* Title */
.br-smart-filter-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.br-smart-filter-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(135deg, #005fcc 0%, #00d2ff 100%);
    border-radius: 4px;
    margin-right: 12px;
}

/* Filter Groups */
.br-filter-group {
    margin-bottom: 24px;
}

.br-filter-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 8px;
}

/* Checkboxes Container */
.br-filter-checkboxes {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Checkboxes */
.br-filter-checkboxes::-webkit-scrollbar {
    width: 4px;
}
.br-filter-checkboxes::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
.br-filter-checkboxes::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 4px;
}
.br-filter-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Filter Items */
.br-filter-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.br-filter-item:hover {
    background-color: #f7f9fc;
}

/* Custom Checkbox Styling */
.br-filter-cb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background-color: #fff;
    flex-shrink: 0;
}

.br-filter-cb:hover {
    border-color: #005fcc;
}

.br-filter-cb:checked {
    background-color: #005fcc;
    border-color: #005fcc;
}

.br-filter-cb:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.br-filter-item-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    flex-grow: 1;
    line-height: 1.4;
    transition: color 0.2s;
}

.br-filter-cb:checked + .br-filter-item-label {
    font-weight: 600;
    color: #111827;
}

.br-filter-count {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

/* Action Buttons */
.br-filter-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
}

.br-btn {
    flex: 1;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.br-btn-primary {
    background: linear-gradient(135deg, #005fcc 0%, #004ba3 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 95, 204, 0.2);
}

.br-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 95, 204, 0.3);
}

.br-btn-primary:active {
    transform: translateY(0);
}

.br-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.br-btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Loading State */
.br-filter-loading {
    text-align: center;
    padding: 16px;
    color: #005fcc;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.br-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 95, 204, 0.2);
    border-top-color: #005fcc;
    border-radius: 50%;
    animation: br-spin 0.8s linear infinite;
}

@keyframes br-spin {
    to { transform: rotate(360deg); }
}

/* OR Results Section (You may also like) */
.br-or-results {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.br-or-results-title {
    margin-bottom: 30px;
    font-size: 26px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.5px;
}
