/*
 * CSS para o Filtro de Quartos da Pousada Cipriani.
 */

:root {
    --pc-filter-width-desktop: 280px;
    --pc-filter-gap: 30px;
    --pc-primary-color: #0C341A;
    --pc-light-gray: #f0f0f0;
    --pc-text-color: #333;
    --pc-border-radius: 4px;
}

.pc-filter-layout-wrapper .elementor-widget-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pc-filter-gap);
}

.pc-filter-column {
    flex: 0 0 var(--pc-filter-width-desktop);
    position: sticky;
    top: 20px;
    align-self: flex-start;
    overflow-y: auto;
}

.pc-results-column {
    flex: 1;
    min-width: 0;
}

/* O painel de filtros do desktop */
.pc-filters-wrapper {
    background-color: #fff;
    padding: 20px;
    border: 1px solid var(--pc-light-gray);
    border-radius: var(--pc-border-radius);
    color: var(--pc-text-color);
}

.pc-filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pc-light-gray);
}
.pc-filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.pc-filter-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}
.pc-filter-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 400;
}
.pc-filter-group input[type="checkbox"],
.pc-filter-group input[type="radio"] {
    margin-right: 8px;
    transform: translateY(1px);
}
.pc-filter-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: var(--pc-border-radius);
}

.pc-filter-description {
    font-size: 13px;
    color: #666;
    margin-top: -10px;
    margin-bottom: 15px;
    line-height: 1.4;
}

#pc-reset-filters {
    width: 100%;
    padding: 10px;
    background-color: #777;
    color: #fff;
    border: none;
    border-radius: var(--pc-border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#pc-reset-filters:hover {
    background-color: #555;
}

/* Outros estilos (loading, no-results) permanecem os mesmos */
.pc-loading-results { position: relative; opacity: 0.5; transition: opacity 0.3s ease; }
.pc-loading-results::after { content: ''; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 4px solid var(--pc-light-gray); border-top-color: var(--pc-primary-color); border-radius: 50%; animation: pc-spin 1s linear infinite; z-index: 11; }
@keyframes pc-spin { to { transform: rotate(360deg); } }
.pc-no-results { width: 100%; text-align: center; padding: 40px 20px; background-color: var(--pc-light-gray); border-radius: var(--pc-border-radius); }


/*
 * ===============================================
 * LÓGICA RESPONSIVA (VERSÃO CORRIGIDA)
 * ===============================================
 */

@media (max-width: 991px) {

    /* Mostra o botão flutuante, que agora pode aparecer pois sua coluna "pai" está visível */
    body #pc-mobile-filter-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 15px;
        left: 15px;
        /*z-index: 2;*/
        background-color: var(--pc-primary-color);
        color: #fff;
        padding: 10px 15px;
        border: none;
        border-radius: 50px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        cursor: pointer;
        font-size: 14px;
        font-weight: bold;
    }
    
    #pc-mobile-filter-trigger svg {
        margin-right: 8px;
    }

    /* O painel de filtros (gerado pelo shortcode) é transformado em um menu lateral */
    .pc-filters-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        max-width: calc(100vw - 50px);
        z-index: 100;
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0,0,0,0.1);
        transform: translateX(-105%);
        transition: transform 0.35s ease-in-out;
        border-radius: 5px;
        background-color: #fff;
    }

    /* A classe .is-open, adicionada pelo JS, faz o painel aparecer */
    .pc-filters-wrapper.is-open {
        transform: translateX(0);
    }
    
    .pc-filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #pc-close-filter-trigger {
        display: block;
        background: none;
        border: none;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        padding: 5px;
    }
    
    body.pc-filter-noscroll::after {
        content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1;
    }
    body.pc-filter-noscroll {
        overflow: hidden;
    }
}

/* Regra para o Desktop */
@media (min-width: 992px) {
    /* Esconde o botão flutuante e o cabeçalho do painel mobile */
    #pc-mobile-filter-trigger,
    .pc-filters-header {
        display: none;
    }
}

/*
 * ===============================================
 * CSS FINAL PARA EXIBIÇÃO DO STATUS DO QUARTO
 * ===============================================
 */

/* 1. Esconde todos os badges de status por padrão. */
.status-badge-livre,
.status-badge-reservado,
.status-badge-ocupado {
    display: none;
}

/* 2. Mostra o badge correto baseado na classe do card pai. */
.e-loop-item.quarto_status-livre .status-badge-livre {
    display: block;
}

.e-loop-item.quarto_status-reservado .status-badge-reservado {
    display: block;
}

.e-loop-item.quarto_status-ocupado .status-badge-ocupado {
    display: block;
}

.status-badge-livre {
    background-color: #28a745; /* Verde */
}

.status-badge-reservado {
    background-color: #ffc107; /* Amarelo */
    color: #333; /* Texto escuro para melhor contraste */
}

.status-badge-ocupado {
    background-color: #dc3545; /* Vermelho */
}






/* --- COMODIDADES DO QUARTO --- */
.widget-comodidade-ar-condicionado,
.widget-comodidade-tv,
.widget-comodidade-ventilador,
.widget-comodidade-frigobar,
.widget-comodidade-banheiro,
.widget-comodidade-varanda-externa {
    display: none;
}
.comodidade_quarto-ar-condicionado .widget-comodidade-ar-condicionado,
.comodidade_quarto-tv .widget-comodidade-tv,
.comodidade_quarto-ventilador .widget-comodidade-ventilador,
.comodidade_quarto-frigobar .widget-comodidade-frigobar,
.comodidade_quarto-banheiro .widget-comodidade-banheiro,
.comodidade_quarto-varanda-externa .widget-comodidade-varanda-externa {
    display: flex;
}