/* Custom User Registration System Styles */

#custom-registration-form,
#custom-login-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#custom-registration-form h3,
#custom-login-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.form-group input.error {
    border-color: #dc3232;
}

.error-text {
    color: #dc3232;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #005a87;
}

button[type="submit"]:active {
    transform: translateY(1px);
}

/* Message styles */
#registration-message,
#login-message,
#forgot-message,
#otp-message,
#reset-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Links */
#custom-login-form a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

#custom-login-form a:hover {
    text-decoration: underline;
}

#custom-login-form p {
    text-align: center;
    margin-top: 15px;
}

/* Form transitions */
#forgot-password-form,
#otp-verification-form,
#password-reset-form {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 600px) {
    #custom-registration-form,
    #custom-login-form {
        margin: 10px;
        padding: 15px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    button[type="submit"] {
        padding: 12px;
        font-size: 16px;
    }
}

/* Input validation states */
.form-group input:valid {
    border-color: #28a745;
}

.form-group input:invalid {
    border-color: #dc3232;
}

/* Placeholder styles */
.form-group input::placeholder {
    color: #999;
    font-style: italic;
}

/* Focus states for better accessibility */
button:focus,
input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading animation */
.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: #0c5460;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}