/*
 * revizie-front | filters-mobile.css
 * Modern mobile-friendly filter styling
 * Copyright 2025 WebDirect
 */

/* ============================================
   MOBILE FILTER STYLING
   ============================================ */

/* Filter Cards */
.filter-card {
    border: none;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0 !important;
    margin-bottom: 0;
}

.filter-card:last-child {
    border-bottom: none;
}

.filter-card .card-header {
    background-color: white;
    border: none;
    padding: 0;
}

.filter-card .filter-toggle {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    border: none;
}

.filter-card .filter-toggle:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.filter-card .filter-toggle:focus {
    outline: none;
    box-shadow: none;
}

.filter-card .filter-toggle .filter-title {
    flex: 1;
    color: #333;
}

.filter-card .filter-toggle i {
    color: #e74c3c;
    font-size: 14px;
    transition: transform 0.3s ease;
}

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

.filter-card .card-body {
    padding: 15px 20px 20px;
    background-color: #f8f9fa;
}

/* Search Input */
.filter-search {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-search:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Filter List */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.filter-list li {
    padding: 0;
    margin-bottom: 12px;
}

.filter-list li:last-child {
    margin-bottom: 0;
}

/* Custom Checkbox */
.filter-checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 35px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

.filter-checkbox-label input,
.filter-checkbox-label .filter-checkbox {
    position: absolute !important;
    opacity: 0 !important;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-checkbox-label .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-checkbox-label:hover input ~ .checkmark,
.filter-checkbox-label:hover .filter-checkbox ~ .checkmark {
    border-color: #e74c3c;
}

.filter-checkbox-label input:checked ~ .checkmark,
.filter-checkbox-label .filter-checkbox:checked ~ .checkmark {
    background-color: #e74c3c !important;
    border-color: #e74c3c !important;
}

.filter-checkbox-label .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox-label input:checked ~ .checkmark:after,
.filter-checkbox-label .filter-checkbox:checked ~ .checkmark:after {
    display: block !important;
}

.filter-checkbox-label .filter-name {
    color: #333;
    font-weight: 400;
}

.filter-checkbox-label input:checked ~ .filter-name {
    color: #e74c3c;
    font-weight: 600;
}

/* Scrollbar Styling */
.filter-list::-webkit-scrollbar {
    width: 6px;
}

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

.filter-list::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 10px;
}

.filter-list::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

/* ============================================
   MOBILE SPECIFIC
   ============================================ */
@media (max-width: 991.98px) {
    /* Make filters more touch-friendly */
    .filter-card .filter-toggle {
        padding: 20px 15px;
        font-size: 16px;
    }
    
    .filter-checkbox-label {
        padding: 12px 0 12px 35px;
        font-size: 15px;
    }
    
    .filter-checkbox-label .checkmark {
        height: 24px;
        width: 24px;
    }
    
    .filter-list {
        max-height: 400px;
    }
    
    /* Better spacing on mobile */
    .filter-card .card-body {
        padding: 20px 15px;
    }
    
    .filter-search {
        font-size: 15px;
        padding: 12px 15px;
    }
}

/* ============================================
   DESKTOP OPTIMIZATIONS
   ============================================ */
@media (min-width: 992px) {
    .filter-card .filter-toggle {
        padding: 15px 20px;
    }
    
    .filter-list {
        max-height: 250px;
    }
}

