/**
 * Unified Catalog Filter Styles
 * Common styles for /catalog, /vehicle_category, and /vehicle_type pages
 * Version: 1.0.0
 */

/* ================================================
   FILTER CONTAINER
   ================================================ */
.c-filter--enhanced {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    padding: 20px 0;
}

.c-filter--enhanced .c-filter__wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

/* ================================================
   FILTER FIELDS - GENERAL
   ================================================ */
.c-filter--enhanced .c-filter__field {
    flex: 1;
    min-width: 200px;
}

.c-filter--enhanced .c-filter__title {
    font-size: 0.9em;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c-filter--enhanced .c-filter__element {
    position: relative;
}

/* ================================================
   CATEGORY FIELD
   ================================================ */
.c-filter--enhanced .c-filter__field--category select {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c-filter--enhanced .c-filter__field--category select:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.c-filter--enhanced .c-filter__field--category select option {
    background: white;
    color: #333;
}

.c-filter--enhanced .c-filter__field--category select.c-filter__select--active {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* ================================================
   CONDITION (DURATION) FIELD
   ================================================ */
.c-filter--enhanced .c-filter__field--condition select {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c-filter--enhanced .c-filter__field--condition select:hover {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.c-filter--enhanced .c-filter__field--condition select option {
    background: white;
    color: #333;
}

.c-filter--enhanced .c-filter__field--condition select.c-filter__select--active {
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

/* ================================================
   DATE FIELD
   ================================================ */
.c-filter--enhanced .c-filter__field--single-date .c-filter__date {
    border: 2px solid #ddd;
    background: white;
    color: #333;
    padding: 12px 40px 12px 16px;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.c-filter--enhanced .c-filter__field--single-date .c-filter__date:hover {
    border-color: #f39c12;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.15);
}

.c-filter--enhanced .c-filter__field--single-date .c-filter__date:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
    outline: none;
}

.c-filter--enhanced .c-filter__field--single-date .c-filter__date--active {
    background: white;
    color: #333;
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.c-filter--enhanced .c-filter__field--single-date .c-filter__calendar {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #f39c12;
    font-size: 1.2em;
    pointer-events: none;
}

/* ================================================
   SEARCH BUTTON
   ================================================ */
.c-filter--enhanced .c-filter__field--button {
    flex: 0 0 auto;
    min-width: auto;
}

.c-filter--enhanced .c-filter__button {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.c-filter--enhanced .c-filter__button:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    transform: translateY(-2px);
}

.c-filter--enhanced .c-filter__button:active {
    transform: translateY(0);
}

.c-filter--enhanced .c-filter__button i {
    font-size: 1.2em;
}

/* ================================================
   ACTIVE FILTERS DISPLAY
   ================================================ */
.c-catalog-ordering {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.c-catalog-ordering__col--result {
    flex: 1;
    min-width: 200px;
}

.c-catalog-ordering__col--result b {
    color: #27ae60;
    font-size: 1.1em;
}

.active-filters {
    display: block;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    font-size: 0.9em;
}

.active-filters strong {
    color: #e67e22;
}

.c-catalog-ordering__col--view-mode {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ================================================
   CLEAR FILTERS BUTTON
   ================================================ */
.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.clear-filters-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    transform: translateY(-2px);
}

.clear-filters-btn:active {
    transform: translateY(0);
}

.clear-filters-btn::before {
    content: "×";
    font-size: 1.4em;
    font-weight: bold;
}

/* ================================================
   NO RESULTS MESSAGE
   ================================================ */
.c-catalog__nothing {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
    font-size: 1.1em;
}

.c-catalog__nothing::before {
    content: "😕";
    display: block;
    font-size: 3em;
    margin-bottom: 15px;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet */
@media (max-width: 992px) {
    .c-filter--enhanced .c-filter__field {
        min-width: 180px;
    }
    
    .c-filter--enhanced .c-filter__button {
        padding: 12px 25px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .c-filter--enhanced {
        padding: 15px;
        border-radius: 8px;
    }
    
    .c-filter--enhanced .c-filter__wrap {
        flex-direction: column;
        gap: 15px;
    }
    
    .c-filter--enhanced .c-filter__field {
        width: 100%;
        min-width: 100%;
    }
    
    .c-filter--enhanced .c-filter__field--button {
        width: 100%;
    }
    
    .c-filter--enhanced .c-filter__button {
        width: 100%;
        padding: 14px;
        font-size: 1em;
    }
    
    .c-catalog-ordering {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .c-catalog-ordering__col--view-mode {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .clear-filters-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .c-filter--enhanced .c-filter__title {
        font-size: 0.85em;
    }
    
    .c-filter--enhanced .c-filter__field--category select,
    .c-filter--enhanced .c-filter__field--condition select,
    .c-filter--enhanced .c-filter__field--single-date .c-filter__date {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    
    .c-catalog-ordering__col--result {
        font-size: 0.9em;
    }
    
    .active-filters {
        font-size: 0.85em;
    }
}

/* ================================================
   CATEGORY-SPECIFIC OVERRIDES
   ================================================ */
/* Reserved for future category-specific customizations */

/* ================================================
   DARK MODE SUPPORT (Optional)
   ================================================ */
@media (prefers-color-scheme: dark) {
    .c-filter--enhanced {
        background: rgba(30, 30, 30, 0.98);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .c-filter--enhanced .c-filter__title {
        color: #aaa;
    }
    
    .c-catalog-ordering {
        background: #2c2c2c;
        color: #e0e0e0;
    }
}
