/* ═══════════════════════════════════════════════
 *  FULL-SCREEN OVERLAY
 * ═══════════════════════════════════════════════ */
#login-popup-overlay {
    position: fixed;
    inset: 0;
    background: #1a1a2e url('https://tbc.xcoprojects.co.za/wp-content/uploads/2025/03/AdobeStock_510524549-scaled.jpeg') no-repeat center center;
    background-size: cover;
    z-index: 99999;               /* higher than most themes / admin bars */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ═══════════════════════════════════════════════
 *  POPUP CARD
 * ═══════════════════════════════════════════════ */
#login-popup {
    background: #fff;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    animation: loginPopupFadeIn 0.4s ease;
}

@keyframes loginPopupFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Shake on failed login ── */
.login-popup-shake {
    animation: loginPopupShake 0.4s ease;
}

@keyframes loginPopupShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}

/* ═══════════════════════════════════════════════
 *  LOGO
 * ═══════════════════════════════════════════════ */
.login-popup-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-popup-logo img {
    max-height: 60px;
    width: auto;
}

.login-popup-logo h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

/* ═══════════════════════════════════════════════
 *  FORM FIELDS
 * ═══════════════════════════════════════════════ */
.login-form-container {
    padding-top: 4px;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label,
#reset-password-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

#loginform-popup input[type="text"],
#loginform-popup input[type="password"],
#reset-password-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#loginform-popup input[type="text"]:focus,
#loginform-popup input[type="password"]:focus,
#reset-password-form input[type="email"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* ── Password field with toggle button ── */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    padding-right: 42px !important;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #888;
    line-height: 1;
}

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

/* ── Remember me ── */
.login-remember {
    margin-bottom: 16px;
}

.login-remember label {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════
 *  SUBMIT BUTTONS
 * ═══════════════════════════════════════════════ */
#loginform-popup input[type="submit"],
#reset-password-form input[type="submit"] {
    width: 100%;
    padding: 11px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease;
}

#loginform-popup input[type="submit"]:hover,
#reset-password-form input[type="submit"]:hover {
    background: #005a87;
}

#loginform-popup input[type="submit"]:disabled,
#reset-password-form input[type="submit"]:disabled {
    background: #a0c8dd;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════
 *  MESSAGES (success / error)
 * ═══════════════════════════════════════════════ */
.login-msg {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}

.login-msg--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-msg--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ═══════════════════════════════════════════════
 *  LINKS (forgot password / back to login)
 * ═══════════════════════════════════════════════ */
.login-popup-links {
    text-align: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.lost-password-link,
.back-to-login-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.lost-password-link:hover,
.back-to-login-link:hover {
    text-decoration: underline;
    color: #005a87;
}

/* ═══════════════════════════════════════════════
 *  RESET PASSWORD FORM
 * ═══════════════════════════════════════════════ */
.reset-description {
    font-size: 13px;
    color: #555;
    margin-bottom: 18px;
    line-height: 1.5;
}

#reset-password-form .login-field {
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
 *  RESPONSIVE
 * ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
    #login-popup {
        padding: 28px 20px 22px;
        border-radius: 10px;
    }

    .login-popup-logo img {
        max-height: 48px;
    }
}
