/* =====================================================
   FILTERS PAGE STYLES
   ===================================================== */

/* Filters Panel */
.filters-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.filters-panel h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filters-panel h4 i {
    margin-right: 8px;
    color: #007bff;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.filter-title i {
    margin-right: 8px;
    color: #007bff;
    font-size: 0.9rem;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 3px;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-label {
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
    user-select: none;
}

.form-check-label:hover {
    color: #007bff;
}

/* Select Dropdowns */
.form-select-sm {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
}

.form-select-sm:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Price and Year Inputs */
.price-inputs,
.year-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-control-sm {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-control-sm:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Filter Actions */
.filter-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-sm {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Results Area */
.results-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #007bff;
}

.results-header h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.results-header p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Active Filters Display */
.active-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.active-filters h6 {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge a {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    margin-left: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.badge a:hover {
    opacity: 1;
}

/* Alert Styles */
.alert {
    border-radius: 6px;
    border: 1px solid #d1ecf1;
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 12px 15px;
}

.alert i {
    margin-right: 8px;
}

/* Scrollbar Styling */
.filters-panel::-webkit-scrollbar {
    width: 6px;
}

.filters-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filters-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.filters-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 991px) {
    .filters-panel {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 30px;
    }

    .filter-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .filters-panel {
        padding: 20px;
    }

    .filters-panel h4 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .filter-title {
        font-size: 0.9rem;
    }

    .form-check-label {
        font-size: 0.9rem;
    }

    .filter-tags {
        gap: 6px;
    }

    .badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .filters-panel {
        padding: 15px;
    }

    .filters-panel h4 {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .filter-section {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .results-header {
        padding: 15px;
    }

    .results-header h4 {
        font-size: 1.1rem;
    }

    .filter-tags {
        flex-direction: column;
    }

    .badge {
        width: 100%;
        justify-content: space-between;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filters-panel,
.results-header,
.active-filters {
    animation: slideIn 0.3s ease-out;
}

/* Hover Effects */
.filter-section {
    transition: all 0.2s ease;
}

.filter-section:hover {
    background-color: #fafafa;
}

/* Focus States */
.form-check-input:focus,
.form-select-sm:focus,
.form-control-sm:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .filter-actions,
    .btn {
        display: none;
    }

    .filters-panel {
        position: static;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

