/**
 * Estilos para o componente Guest Selector
 * Rancho Paraíso - Seletor de Hóspedes
 * @version 1.0.0
 */

/* === Container Principal === */
.guest-selector {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    z-index: 100;
}

/* === Trigger (Botão que abre o dropdown) === */
.guest-trigger {
    width: 100%;
    padding: 1rem;
    background: #FFFFFF;
    border: 2px solid #cfe6d1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    text-align: left;
}

.guest-trigger:hover {
    border-color: #3a6b35;
    box-shadow: 0 4px 12px rgba(58, 107, 53, 0.15);
}

.guest-trigger:focus {
    outline: none;
    border-color: #3a6b35;
    box-shadow: 0 0 0 3px rgba(58, 107, 53, 0.2);
}

.guest-trigger[aria-expanded="true"] {
    border-color: #3a6b35;
    box-shadow: 0 4px 12px rgba(58, 107, 53, 0.2);
}

.guest-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3a6b35;
    margin-bottom: 0.5rem;
    display: block;
}

.guest-display-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guest-display {
    font-size: 1.1rem;
    color: #24343a;
    font-weight: 500;
    flex: 1;
}

.guest-icon {
    font-size: 1rem;
    color: #3a6b35;
    transition: transform 0.3s ease;
}

.guest-trigger[aria-expanded="true"] .guest-icon {
    transform: rotate(180deg);
}

/* === Dropdown === */
.guest-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 2px solid #cfe6d1;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 350px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: none;
}

.guest-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.guest-dropdown-content {
    padding: 1.5rem;
    background: #FFFFFF;
    border-radius: 12px;
}

/* === Header do Dropdown === */
.guest-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f4e9d8;
}

.guest-dropdown-header span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3a6b35;
    font-family: 'Poppins', sans-serif;
}

.guest-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8c5e3c;
    transition: all 0.2s ease;
}

.guest-close:hover {
    background-color: #f4e9d8;
    color: #3a6b35;
}

/* === Contadores === */
.guest-counters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guest-counter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.guest-counter-row:hover {
    background-color: #f6fbf7;
}

.guest-type {
    flex: 1;
}

.guest-type-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #24343a;
    margin-bottom: 0.25rem;
}

.guest-type-desc {
    display: block;
    font-size: 0.85rem;
    color: #717171;
}

/* === Controles do Contador === */
.counter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #cfe6d1;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #3a6b35;
    font-size: 1rem;
}

.counter-btn:not(:disabled):hover {
    border-color: #3a6b35;
    background-color: #3a6b35;
    color: white;
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.counter-value {
    min-width: 30px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a6b35;
    user-select: none;
}

/* === Footer do Dropdown === */
.guest-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #f4e9d8;
}

.capacity-info {
    font-size: 0.9rem;
    color: #8c5e3c;
    font-style: italic;
}

.apply-btn {
    background: linear-gradient(135deg, #3a6b35, #539b50);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 24px rgba(58, 107, 53, 0.35);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(58, 107, 53, 0.45);
}

.apply-btn:active {
    transform: translateY(0);
}

/* === Responsividade === */
@media (max-width: 768px) {
    .guest-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        right: auto;
        z-index: 10000;
    }
    
    .guest-dropdown.show {
        transform: translate(-50%, -50%);
    }
    
    /* Overlay para mobile */
    .guest-dropdown::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        width: 100vw;
        height: 100vh;
        margin-left: -50vw;
        margin-top: -50vh;
    }
    
    .guest-dropdown-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .guest-dropdown {
        width: 95%;
    }
    
    .guest-dropdown-content {
        padding: 1rem;
    }
    
    .guest-type-label {
        font-size: 0.95rem;
    }
    
    .guest-type-desc {
        font-size: 0.8rem;
    }
    
    .counter-controls {
        gap: 0.75rem;
    }
    
    .counter-btn {
        width: 32px;
        height: 32px;
    }
}

/* === Integração com o tema do Rancho Paraíso === */
.guest-selector-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    color: #8c5e3c;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.guest-selector-subtitle {
    text-align: center;
    color: #717171;
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
