/*!
 * CBT Exam Pro — Auth Pages Stylesheet
 *
 * Loaded by [cbt_login], [cbt_register], [cbt_forgot_password],
 * [cbt_reset_password], [cbt_verify_email] shortcodes.
 *
 * The auth pages now render INSIDE the active WordPress theme
 * (so the theme header / nav / footer is preserved), and these
 * styles are scoped under .cbt-auth-wrap to avoid collisions.
 */

.cbt-auth-wrap {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol", "Noto Color Emoji";
}

.cbt-auth-wrap.is-wide { max-width: 620px; }

.cbt-auth-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 32px 28px;
}

.cbt-auth-header { text-align: center; margin-bottom: 22px; }
.cbt-auth-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.cbt-auth-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.cbt-auth-form .cbt-field { margin-bottom: 16px; position: relative; }
.cbt-auth-form .cbt-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}
.cbt-auth-form .cbt-field input,
.cbt-auth-form .cbt-field select,
.cbt-auth-form .cbt-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    background: #fff;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cbt-auth-form .cbt-field input:focus,
.cbt-auth-form .cbt-field select:focus,
.cbt-auth-form .cbt-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cbt-auth-form .cbt-field-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.cbt-auth-form .cbt-field-row .cbt-field { flex: 1 1 200px; }

.cbt-auth-form .cbt-pw-wrap { position: relative; }
.cbt-auth-form .cbt-pw-wrap input { padding-right: 42px; }
.cbt-auth-form .cbt-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
}
.cbt-auth-form .cbt-pw-toggle:hover { color: #2563eb; }

.cbt-auth-form .cbt-strength {
    margin-top: 6px;
    height: 4px;
    border-radius: 4px;
    background: #f1f5f9;
    overflow: hidden;
}
.cbt-auth-form .cbt-strength-bar {
    height: 100%;
    width: 0%;
    background: #ef4444;
    transition: width .25s ease, background .25s ease;
}
.cbt-auth-form .cbt-strength-bar.is-fair   { background: #f59e0b; }
.cbt-auth-form .cbt-strength-bar.is-good   { background: #3b82f6; }
.cbt-auth-form .cbt-strength-bar.is-strong { background: #16a34a; }
.cbt-auth-form .cbt-strength-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.cbt-auth-form .cbt-checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    color: #475569;
    margin: 8px 0 14px;
}
.cbt-auth-form .cbt-checkbox input[type="checkbox"] {
    width: auto;
    margin: 2px 0 0;
    flex-shrink: 0;
}

.cbt-auth-form .cbt-row-spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
}
.cbt-auth-form .cbt-row-spread a { color: #2563eb; text-decoration: none; }
.cbt-auth-form .cbt-row-spread a:hover { text-decoration: underline; }

.cbt-auth-form .cbt-submit {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease, transform .05s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.cbt-auth-form .cbt-submit:hover { opacity: 0.95; }
.cbt-auth-form .cbt-submit:active { transform: translateY(1px); }
.cbt-auth-form .cbt-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.cbt-auth-form .cbt-submit.is-secondary {
    background: #fff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    box-shadow: none;
}

.cbt-auth-divider {
    text-align: center;
    color: #94a3b8;
    margin: 18px 0;
    position: relative;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cbt-auth-divider::before,
.cbt-auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 28px);
    height: 1px;
    background: #e5e7eb;
}
.cbt-auth-divider::before { left: 0; }
.cbt-auth-divider::after  { right: 0; }

.cbt-auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s ease, border-color .15s ease;
}
.cbt-auth-google:hover {
    background: #f8fafc;
    border-color: #2563eb;
    color: #2563eb;
}
.cbt-auth-google svg { width: 18px; height: 18px; }

.cbt-auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #475569;
}
.cbt-auth-footer a { color: #2563eb; text-decoration: none; font-weight: 600; }
.cbt-auth-footer a:hover { text-decoration: underline; }

/* ---------------- Notices ---------------- */
.cbt-auth-notice {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}
.cbt-auth-notice.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.cbt-auth-notice.is-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.cbt-auth-notice.is-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.cbt-auth-notice.is-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.cbt-auth-notice strong { font-weight: 700; }
.cbt-auth-notice .cbt-auth-notice-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cbt-auth-notice .cbt-auth-notice-actions .button,
.cbt-auth-notice .cbt-auth-notice-actions a.cbt-btn {
    display: inline-block;
    padding: 7px 14px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}
.cbt-auth-notice .cbt-auth-notice-actions .cbt-btn-secondary {
    background: #fff;
    color: #2563eb !important;
    border: 1.5px solid #2563eb;
}

/* ---------------- Verify-email landing card ---------------- */
.cbt-verify-card {
    text-align: center;
}
.cbt-verify-card .cbt-verify-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
}
.cbt-verify-card .cbt-verify-icon.is-success { color: #16a34a; }
.cbt-verify-card .cbt-verify-icon.is-error   { color: #dc2626; }
.cbt-verify-card h2 { margin-top: 4px; }

/* ---------------- Reset / forgot success messages ---------------- */
.cbt-auth-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cbtAuthSpin .7s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}
@keyframes cbtAuthSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---------------- Mobile ---------------- */
@media (max-width: 540px) {
    .cbt-auth-wrap { padding: 0 12px; margin: 20px auto; }
    .cbt-auth-card { padding: 22px 18px; }
    .cbt-auth-form .cbt-field-row { gap: 0; }
    .cbt-auth-form .cbt-field-row .cbt-field { flex: 1 1 100%; }
}
