/* Estilos para Formulários - Aprimorizze API Integration */

/* Estados de validação */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    animation: shake 0.5s ease-in-out;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Mensagens de erro e sucesso dos formulários */
.form-error-message {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.form-error-message::before {
    content: "⚠️";
    margin-right: 8px;
    font-size: 16px;
}

.form-success-message {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.form-success-message::before {
    content: "✅";
    margin-right: 8px;
    font-size: 16px;
}

/* Estados dos botões */
button[type="submit"]:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.8;
    position: relative;
    color: #fff !important;
}

button[type="submit"]:disabled::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

/* Indicadores de carregamento */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    z-index: 10;
}

.form-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #007bff;
    border-radius: 50%;
    border-top-color: rgba(0, 123, 255, 0.3);
    animation: spin 1s ease-in-out infinite;
    z-index: 11;
}

/* Melhorias visuais para campos de formulário */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #ced4da;
    transform: translateY(-1px);
}

/* Checkbox personalizado */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
    accent-color: #007bff;
}

.checkbox-group label {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #6c757d;
}

.checkbox-group label a {
    color: #007bff;
    text-decoration: underline;
}

.checkbox-group label a:hover {
    color: #0056b3;
}

/* Responsividade */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .checkbox-group input[type="checkbox"] {
        align-self: flex-start;
        margin-top: 2px;
    }
}

/* Animações */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Toast notifications (se não existir no CSS principal) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #007bff;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
    cursor: pointer;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast-header {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-body {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #495057;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Melhorias para formulários específicos */
.contact-form,
.contact-modal-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.newsletter-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Estados específicos para mobile */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
        padding: 12px 16px;
    }
    
    .form-error-message,
    .form-success-message {
        padding: 10px 14px;
        font-size: 13px;
    }
} 