/* Shared by login.html / register.html: alert banners, the loading-button
   state, and the modal system used for Forgot Password and OTP verification. */

.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.password-strength {
    height: 5px;
    margin-top: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--surface);
    border-radius: 10px;
    padding: 35px;
    max-width: 420px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-box-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
}

/* OTP entry (registration + login verification) */
.otp-code-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    letter-spacing: 8px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text);
}

.resend-link {
    width: 100%;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 0;
}

.resend-link:disabled {
    color: var(--gray);
    cursor: default;
}
