/**
 * Mobile Filters Styles
 * Premium Design for Mobile Devices
 */

/* Botão Mobile (Só aparece em telas pequenas) */
.gpg-mobile-filter-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.gpg-mobile-filter-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.gpg-mobile-filter-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Modal Wrapper (Padrão Desktop: invisível ou sem efeito de modal) */
.gpg-mobile-filters-modal {
    display: contents;
    /* No desktop, age como se não existisse */
}

.gpg-mobile-filters-overlay,
.gpg-mobile-filters-header {
    display: none;
}

/* Mobile Styles (< 768px) */
@media (max-width: 767px) {
    .gpg-mobile-filter-btn {
        display: flex;
    }

    .gpg-mobile-filters-modal {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 99999;
        pointer-events: none;
        /* Permite clicar através quando fechado */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gpg-mobile-filters-modal.active {
        pointer-events: auto;
        opacity: 1;
    }

    /* Overlay (Fundo escuro/blur) */
    .gpg-mobile-filters-overlay {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gpg-mobile-filters-modal.active .gpg-mobile-filters-overlay {
        opacity: 1;
    }

    /* Conteúdo do Modal (Off-canvas) */
    .gpg-mobile-filters-content {
        position: absolute;
        top: 0;
        left: -100%;
        /* Escondido à esquerda */
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .gpg-mobile-filters-modal.active .gpg-mobile-filters-content {
        left: 0;
    }

    /* Header do Modal */
    .gpg-mobile-filters-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .gpg-mobile-filters-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        color: #333;
    }

    .gpg-mobile-filter-close {
        background: none;
        border: none;
        font-size: 28px;
        color: #666;
        cursor: pointer;
        padding: 0 5px;
        line-height: 1;
    }

    /* Ajustes nos Filtros dentro do Modal */
    .gpg-albums-filters {
        flex-direction: column;
        gap: 15px;
    }

    .gpg-filter-group {
        width: 100%;
        margin: 0;
    }

    .gpg-filter-select,
    .gpg-filter-input {
        width: 100%;
        height: 45px;
        /* Touch friendly */
        font-size: 16px;
    }

    .gpg-custom-dates {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed #eee;
    }

    .gpg-filter-btn {
        width: 100%;
        height: 45px;
        margin-top: 10px;
    }
}