/* ============================================
   COMMON AUTH STYLING - Present in All 4 Pages
   Used by: login.html, signup.html, verify-email.html, password-recovery.html
   ============================================ */

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0065BD;
    box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.1);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    user-select: none;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #666;
}

/* ============================================
   BUTTONS
   ============================================ */
.login-button,
.signup-button,
.primary-button,
.verify-button {
    width: 100%;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #0065BD 0%, #003d7a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 101, 189, 0.3);
}

.login-button:hover,
.signup-button:hover,
.primary-button:hover,
.verify-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 101, 189, 0.4);
}

.login-button:active,
.signup-button:active,
.primary-button:active,
.verify-button:active {
    transform: translateY(0);
}

.login-button:disabled,
.signup-button:disabled,
.primary-button:disabled,
.verify-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   MESSAGE STYLES
   ============================================ */
.error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

.status-message {
    background: #f0f9ff;
    border: 1px solid #bbedf5;
    color: #0065BD;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
}

.status-message.success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

/* ============================================
   LINKS
   ============================================ */
.login-link,
.signup-link,
.resend-link {
    background: none;
    border: none;
    color: #0065BD;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    transition: all 0.3s ease;
}

.login-link:hover,
.signup-link:hover,
.resend-link:hover {
    color: #003d7a;
    text-decoration: underline;
    opacity: 0.8;
}

/* ============================================
   CODE INPUT STYLING (verify-email.html)
   ============================================ */
.code-input-group {
    margin-bottom: 8px;
}

.code-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
    text-align: center;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.code-input {
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.code-input:focus {
    outline: none;
    border-color: #0065BD;
    box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.1);
}

.code-input.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.code-error {
    display: none;
    color: #991b1b;
    font-size: 13px;
    margin-top: 8px;
    animation: slideDown 0.3s ease-out;
}

.code-error.show {
    display: block;
}

.resend-section {
    margin-top: 16px;
    font-size: 13px;
    color: #666;
}

.resend-link {
    background: none;
    border: none;
    color: #0065BD;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    transition: color 0.3s ease;
    font-size: 13px;
}

.resend-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none;
}

.resend-countdown {
    display: inline;
    margin-left: 4px;
}

.spam-note {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    opacity: 0.7;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}