/* =====================================================
   FORMS STYLES - Newsletter e Contact
   ===================================================== */

/* Estilos para feedback dos formulários */
.form-success {
    background: #10B981;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
    animation: slideIn 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.form-error {
    background: #EF4444;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
    animation: slideIn 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Estados de loading */
.form-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading {
    position: relative;
}

.btn-loading::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { 
        transform: translateY(-50%) rotate(0deg); 
    }
    100% { 
        transform: translateY(-50%) rotate(360deg); 
    }
}

/* Ajustes específicos para Newsletter */
.newsletter-form-wrapper {
    position: relative;
    flex: 1;
    justify-content: flex-end;
    display: flex;
    flex-direction: column;
}

.newsletter-form-wrapper .form-success,
.newsletter-form-wrapper .form-error {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    z-index: 10;
    margin-bottom: 0;
    font-size: 14px;
    padding: 10px 15px;
}

/* Ajustes específicos para Contact */
.form-messages {
    grid-column: 1 / -1;
    margin-bottom: 15px;
}

/* Responsivo para formulários */
@media (max-width: 768px) {
    .newsletter-form-wrapper .form-success,
    .newsletter-form-wrapper .form-error {
        position: relative;
        top: auto;
        margin-bottom: 15px;
    }
    
    .form-success,
    .form-error {
        font-size: 14px;
        padding: 12px;
    }
}