/**
 * email-validation.css
 * Styles for email validation feedback
 */

/* Email field states */
#email.valid {
    border: 2px solid #4CAF50;
    background-color: #f1f8f4;
}

#email.invalid {
    border: 2px solid #f44336;
    background-color: #fef1f1;
}

#email:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Feedback message container */
.feedback {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    min-height: 20px;
    transition: all 0.3s ease;
}

.feedback.checking {
    color: #2196F3;
    font-style: italic;
}

.feedback.checking::before {
    content: "⟳ ";
    display: inline-block;
    animation: spin 1s linear infinite;
}

.feedback.success {
    color: #4CAF50;
    font-weight: 500;
}

.feedback.error {
    color: #f44336;
    font-weight: 500;
}

.feedback a {
    color: #2196F3;
    text-decoration: underline;
}

.feedback a:hover {
    color: #1976D2;
}

/* Spinning animation for checking state */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Submit button states */
#submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

#submit-button:not(:disabled) {
    background-color: #d32f2f;
    cursor: pointer;
}

#submit-button:not(:disabled):hover {
    background-color: #b71c1c;
}

/* Tooltip for additional info */
.info-tooltip {
    display: inline-block;
    margin-left: 5px;
    color: #2196F3;
    cursor: help;
    font-size: 12px;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-top: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .feedback {
        font-size: 12px;
    }
}
