/* 
 * Styles pour Zalentino Registration - Login & Register
 */

.zalentino-auth-wrapper {
    max-width: 450px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Masquer les formulaires WooCommerce par défaut */
.u-column1.col-1,
.u-column2.col-2 {
    display: none !important;
}

/* Contenu des formulaires */
.zalentino-tab-content {
    display: none;
}

.zalentino-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in;
}

.zalentino-tab-content h2 {
    text-align: center;
    margin: 0 0 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Formulaires */
.zalentino-form-row {
    margin-bottom: 18px;
}

.zalentino-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.zalentino-form-row label .required {
    color: #e74c3c;
}

.zalentino-form-row input[type="text"],
.zalentino-form-row input[type="tel"],
.zalentino-form-row input[type="email"],
.zalentino-form-row input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.zalentino-form-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.zalentino-form-row input:invalid {
    border-color: #e74c3c;
}

.zalentino-form-row .form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* Boutons */
.btn-zalentino-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-zalentino-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-zalentino-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.button-link {
    background: none;
    border: none;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.button-link:hover {
    color: #2980b9;
}

.button-link-register {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.button-link-register:hover {
    text-decoration: underline;
}

/* Liens */
.zalentino-links {
    text-align: center;
    margin-top: 15px;
}

/* Lien d'enregistrement */
.zalentino-register-link,
.zalentino-login-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    color: #666;
}

.zalentino-register-link a,
.zalentino-login-link a {
    margin-left: 5px;
}

/* Étapes */
.zalentino-step {
    animation: fadeIn 0.4s ease-in;
}

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

/* Message de succès */
.zalentino-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #c3e6cb;
}

.zalentino-success-message .dashicons {
    color: #28a745;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.zalentino-success-message strong {
    color: #0c5460;
}

/* Messages d'erreur et succès */
.zalentino-messages {
    margin-top: 20px;
}

.zalentino-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.zalentino-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.zalentino-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.zalentino-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading state */
.btn-zalentino-primary.loading {
    position: relative;
    color: transparent;
}

.btn-zalentino-primary.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Code OTP input styling */
input[name="otp_code"] {
    text-align: center;
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 600px) {
    .zalentino-auth-wrapper {
        margin: 20px;
        padding: 20px;
    }
    
    .zalentino-tab-content h2 {
        font-size: 20px;
    }
    
    .btn-zalentino-primary {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Animation shake pour les erreurs */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
