/**
 * Email Validation Styles
 * Visual feedback for email validation
 */

/* Email Status Indicator */
.email-status {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.email-status.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.email-status.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.email-status.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Email Input States */
.email-input-wrapper {
    position: relative;
}

.email-input-wrapper input[type="email"] {
    transition: border-color 0.3s ease;
}

.email-input-wrapper input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Input with validation icon */
.email-input-wrapper.has-validation {
    position: relative;
}

.email-input-wrapper.has-validation input {
    padding-right: 40px;
}

.email-validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.email-validation-icon.loading {
    animation: spin 1s linear infinite;
}

.email-validation-icon.success {
    color: #10b981;
}

.email-validation-icon.error {
    color: #ef4444;
}

.email-validation-icon.warning {
    color: #f59e0b;
}

@keyframes spin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Email Suggestion */
.email-suggestion {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-suggestion:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateX(2px);
}

.email-suggestion strong {
    color: #78350f;
    font-weight: 600;
}

/* Dark Theme Support */
[data-theme="dark"] .email-status.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .email-status.warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .email-status.success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .email-suggestion {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: #fbbf24;
}

[data-theme="dark"] .email-suggestion strong {
    color: #fde68a;
}

/* Animation for status appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-status {
    animation: slideDown 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .email-status {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .email-suggestion {
        font-size: 12px;
        padding: 6px 10px;
    }
}
