/**
 * Стили для системы фильтров поиска
 */

/* Основные стили кнопки фильтров */
.search-form .filters-btn,
.filters-btn {
    background: #444 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    cursor: pointer;
    white-space: nowrap;
    height: 40px !important;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px !important;
    min-width: 80px !important;
    min-height: 40px !important;
}

.filters-btn:hover {
    background: #555 !important;
    transform: translateY(-1px);
}

.filters-btn:active {
    background: #333 !important;
    transform: translateY(0);
}

/* Активное состояние кнопки */
.filters-btn.active {
    background: #666 !important;
    color: #fff;
}

.filters-btn.active:hover {
    background: #777 !important;
}

/* Контейнер фильтров */
#searchFilters {
    background: #333;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #555;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Сетка фильтров */
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.filter-group label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px;
    background: #444;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
}

.filter-group input[type="number"] {
    width: 100px;
}

/* Кнопки действий */
.filters-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-apply {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-apply:hover {
    background: #cc0000;
}

.btn-clear {
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    color: #fff;
    border-color: #777;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .search-row {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: stretch !important;
    }
    
    .search-input-container {
        flex: 1 !important;
    }
    
    .filters-btn {
        width: auto !important;
        height: auto !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        min-width: 70px !important;
        flex-shrink: 0 !important;
    }
    
    #searchFilters {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        margin-top: 10px;
        border-radius: 4px;
    }
    
    .filters-grid {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100% !important;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .filters-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-apply,
    .btn-clear {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .search-row {
        gap: 6px !important;
    }
    
    .filters-btn {
        font-size: 13px !important;
        padding: 10px 12px !important;
        min-width: 60px !important;
    }
    
    #searchFilters {
        padding: 12px;
    }
    
    .filters-grid {
        gap: 8px;
    }
}