/* ===== ESTILOS LIMPOS PARA MODAIS E FORMULÁRIOS ===== */
/* Sem efeitos de luz, sem gradientes animados, sem brilhos */

/* IMPORTANTE: Reset para garantir layout correto de checkboxes e radio buttons */
.booking-form .checkbox-label,
.booking-form .radio-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.booking-form .checkbox-label > span,
.booking-form .radio-label > span {
    display: inline-block !important;
}

/* Modal backdrop */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(82, 56, 39, 0.9);
    overflow-y: auto;
    padding: 2rem 0;
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"] {
    display: flex !important;
}

/* Prevenir scroll quando modal está aberto */
body.modal-open {
    overflow: hidden !important;
}

/* Container do modal */
.modal-content {
    background: #fff3d8 !important;
    margin: 0 auto;
    border-radius: 20px !important;
    width: 98%;
    max-width: 1800px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Garantir que não há bordas em nenhum elemento filho */
.modal-content * {
    box-sizing: border-box;
}

.modal-content::before,
.modal-content::after {
    display: none !important;
}

/* Header do modal */
.modal-header {
    padding: 2.5rem 3rem;
    background: #873b4b !important;
    color: white;
    position: relative;
    flex-shrink: 0;
    border: none !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
}

.modal-header h2 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.modal-header h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Botão de fechar */
.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: white;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

/* Corpo do modal */
.modal-body {
    padding: 2.5rem 3rem;
    overflow-y: auto;
    flex: 1;
    background: #fff3d8 !important;
    border: none !important;
    margin: 0 !important;
}

/* Footer do modal */
.modal-footer {
    padding: 2rem 3rem;
    background: #fff3d8 !important;
    border-top: 1px solid rgba(135, 59, 75, 0.15);
    flex-shrink: 0;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    border-radius: 0 0 20px 20px !important;
}

/* Contador de progresso */
.progress-counter {
    background: rgba(135, 59, 75, 0.1);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: white;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.progress-counter .filled {
    color: #ffe63d;
    font-weight: 700;
}

/* Seções do formulário */
.form-section {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
}

.form-section h3 {
    color: #873b4b;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(135, 59, 75, 0.2);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Linhas de formulário */
.booking-form .form-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    margin-bottom: 1rem;
}

.booking-form .form-row .form-group {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 50% !important;
}

/* Exceção: form-group que não está dentro de form-row não deve ter max-width */
.booking-form .form-group:not(.form-row .form-group) {
    max-width: 100% !important;
}

/* Form-group que deve ocupar largura total */
.booking-form .form-group-full {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #523827;
    font-size: 0.9rem;
}

.form-group label[data-required="true"]::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 700;
}

/* Inputs, selects e textareas */
.booking-form input,
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(135, 59, 75, 0.25);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    color: #523827;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
    border-color: #873b4b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 59, 75, 0.1);
}

.booking-form textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Campos condicionais */
.conditional-fields {
    margin-top: 1rem;
}

.conditional-fields .form-group.hidden {
    display: none;
}

.conditional-fields .form-group.visible {
    display: block;
}

/* Checkboxes de deficiência */
.disability-options {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.7rem;
    margin-top: 0.7rem;
    width: 100% !important;
    max-width: 100% !important;
}

.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(135, 59, 75, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    color: #523827;
    font-size: 0.95rem;
    min-height: 50px;
    width: 100% !important;
    max-width: 100% !important;
}

.checkbox-label:hover {
    border-color: #873b4b;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 59, 75, 0.15);
}

.checkbox-label:has(input:checked) {
    border-color: #873b4b;
    background: #873b4b;
    color: white;
    box-shadow: 0 4px 12px rgba(135, 59, 75, 0.25);
}

.checkbox-label input[type="checkbox"] {
    display: none !important;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    background: white;
    flex-shrink: 0 !important;
    transition: all 0.2s ease;
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #873b4b;
}

.checkbox-label:has(input:checked) .checkbox-custom {
    border-color: white;
    background: white;
}

.checkbox-label:has(input:checked) .checkbox-custom::after {
    content: '✓';
    color: #873b4b;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

.checkbox-text {
    flex: 1 !important;
    line-height: 1.4;
    display: inline-block !important;
    white-space: normal;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1rem 0;
}

.radio-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #523827;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(135, 59, 75, 0.25);
    border-radius: 10px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    min-height: 50px;
}

.radio-label:hover {
    border-color: #873b4b;
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.radio-label input[type="radio"] {
    display: none !important;
}

.radio-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    border: 2px solid #9f643d;
    border-radius: 50%;
    background: white;
    flex-shrink: 0 !important;
    transition: all 0.2s ease;
    position: relative;
}

.radio-label:hover .radio-custom {
    border-color: #873b4b;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background: white;
    border-color: white;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #873b4b;
    border-radius: 50%;
}

.radio-label:has(input[type="radio"]:checked) {
    background: #873b4b;
    border-color: #873b4b;
    color: white;
}

.radio-text {
    flex: 1 !important;
    line-height: 1.4;
    display: inline-block !important;
    white-space: normal;
}

/* Estrelas de avaliação */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.2rem 0;
    padding: 0.8rem;
    background: rgba(255, 230, 61, 0.08);
    border-radius: 8px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating .star {
    font-size: 2.2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating .star:hover {
    color: #ffe63d;
}

.star-rating .star:hover ~ .star,
.star-rating input[type="radio"]:checked ~ .star {
    color: #ffc107;
}

/* Botões */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-submit {
    background: #873b4b;
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-submit:hover {
    background: #a04858;
}

.btn-cancel {
    background: transparent;
    color: #523827;
    border: 2px solid #523827;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-cancel:hover {
    background: #523827;
    color: white;
}

/* Responsividade */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 95vh;
        border-radius: 16px !important;
    }
    
    .modal-header {
        border-radius: 16px 16px 0 0 !important;
    }
    
    .modal-footer {
        border-radius: 0 0 16px 16px !important;
    }
    
    .modal {
        padding: 1rem 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem 1.2rem;
    }
    
    .booking-form .form-row {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }
    
    .booking-form .form-row .form-group {
        margin-bottom: 1rem;
        max-width: 100% !important;
    }
    
    .disability-options {
        grid-template-columns: 1fr !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-header h4 {
        font-size: 0.85rem;
    }
    
    .form-section {
        padding: 1.2rem;
    }
    
    .form-section h3 {
        font-size: 1.1rem;
    }
    
    .checkbox-label,
    .radio-label {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .star-rating .star {
        font-size: 1.8rem;
    }
}

/* Acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animação de erro */
.booking-form input.invalid,
.booking-form select.invalid,
.booking-form textarea.invalid {
    border-color: #e74c3c;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%, 75% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
}

/* Loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Regras adicionais para garantir layout correto dos checkboxes e radio buttons */
.disability-options .checkbox-label,
.radio-group .radio-label {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.disability-options .checkbox-label > *,
.radio-group .radio-label > * {
    display: inline-block !important;
}

.disability-options .checkbox-custom,
.radio-group .radio-custom {
    order: 1;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.disability-options .checkbox-text,
.radio-group .radio-text {
    order: 2;
    flex: 1 !important;
    flex-shrink: 1 !important;
    flex-grow: 1 !important;
}
