/* Модальное окно фильтров - анимация справа налево как поиск */
#filters-wrapper {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #121212;
    z-index: 9999;
    overflow-y: scroll;
    scroll-behavior: smooth;
    transform: translateX(100%);
    transition: transform .23s ease-out, right .23s ease-out, z-index .23s ease-in;
    padding: 80px 20px 20px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

#filters-wrapper.active {
    transform: translateX(0);
}

.admin-bar #filters-wrapper {
    top: 32px;
}

/* Кнопка закрытия как в поиске - возвращаем на место */
.filter-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: #FDF2E4;
    font-size: 18px;
    cursor: pointer;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.filter-close-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Фиксированная панель с кнопками действий */
.filter-buttons-panel {
    position: sticky;
    top: 0;
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid #374151;
    z-index: 10002;
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

/* Контейнер для формы с отступом от фиксированной панели */
.filter-form-content {
    padding: 24px;
}

/* Кастомные радио кнопки */
.custom-radio {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6B7280;
    border-radius: 50%;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-radio:checked {
    border-color: #EF4444;
    background: #EF4444;
}

.custom-radio:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.custom-radio:hover {
    border-color: #EF4444;
}

/* Кастомные чекбоксы */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6B7280;
    border-radius: 4px;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    border-color: #EF4444;
    background: #EF4444;
}

.custom-checkbox:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.custom-checkbox:hover {
    border-color: #EF4444;
}

/* Состояния кнопок */
button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.disabled:hover {
    background: inherit !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    #filters-wrapper {
        padding: 15px;
    }
    
    #filters-wrapper .bg-gray-900 {
        max-width: none !important;
        width: 100%;
    }
    
    .filter-buttons-panel {
        padding: 16px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .filter-form-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #filters-wrapper {
        padding: 10px;
    }
    
    .filter-close-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .filter-buttons-panel {
        padding: 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .filter-form-content {
        padding: 16px;
    }
}

/* Блокировка скролла body */
body.has-filter-modal,
html.has-filter-modal {
    overflow: hidden;
    height: 100%;
}


