/* Mobile Filter Drawer Styles */

/* Hide mobile controls on desktop */
.ep-filter-toggle,
.ep-filter-close {
    display: none;
}

/* Mobile drawer implementation */
@media (max-width: 900px) {

    /* Show toggle button */
    .ep-filter-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 18px;
        background: var(--ep-gradient-primary);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 16px;
        box-shadow: 0 4px 12px rgba(var(--ep-primary-rgb), 0.25);
        transition: all 0.2s ease;
    }

    .ep-filter-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(var(--ep-primary-rgb), 0.35);
    }

    .ep-filter-toggle svg {
        flex-shrink: 0;
    }

    /* Transform filter panel into drawer */
    .ep-filter-panel {
        position: fixed;
        top: 0;
        left: -100%;
        bottom: 0;
        width: 85%;
        max-width: 360px;
        z-index: 1000;
        background: #fff;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 20px;
        border-radius: 0;
        border: none;
    }

    .ep-filter-panel.is-open {
        left: 0;
    }

    /* Show close button */
    .ep-filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        background: transparent;
        border: 1px solid var(--ep-border);
        border-radius: 8px;
        cursor: pointer;
        color: var(--ep-text);
        transition: all 0.2s ease;
    }

    .ep-filter-close:hover {
        background: rgba(var(--ep-primary-rgb), 0.08);
        border-color: var(--ep-primary);
        color: var(--ep-primary);
    }

    /* Adjust filter header for mobile */
    .ep-filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .ep-filter-header h2 {
        margin: 0;
        flex: 1;
    }

    /* Backdrop when drawer is open */
    body.ep-filter-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    body.ep-filter-open {
        overflow: hidden;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}