/* Animações simplificadas para os formulários */

/* Animação de entrada suave para os campos do formulário */
.form-group {
    animation: fadeIn 0.3s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.15s; }
.form-group:nth-child(4) { animation-delay: 0.2s; }
.form-group:nth-child(5) { animation-delay: 0.25s; }
.form-group:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação para campos condicionais */
.conditional-fields .form-group.visible {
    animation: expandIn 0.3s ease-out;
}

@keyframes expandIn {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Animação de erro para campos inválidos */
.booking-form input.invalid,
.booking-form select.invalid,
.booking-form textarea.invalid {
    animation: shakeError 0.4s ease-in-out;
}

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

/* Animação de loading para o botão de submit */
.btn-submit.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    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); }
}

/* Animação de entrada para as seções do formulário */
.form-section {
    animation: sectionFadeIn 0.4s ease-out backwards;
}

.form-section:nth-of-type(1) { animation-delay: 0.1s; }
.form-section:nth-of-type(2) { animation-delay: 0.2s; }

@keyframes sectionFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Desabilitar animações para usuários que preferem movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
