/*
 * register-to-predict.css — styles for page-register-to-predict.php
 * Moved verbatim from inline <style> in page-register-to-predict.php (2.3.0); loaded only on
 * that template by m6m_template_styles() in functions.php.
 */

/* ── Outer section ───────────────────────────────────────────── */
.reg-section {
    width: 100%;
    padding-block: var(--wp--custom--layout--section-py);
}

/* ── 5em bounded frame — header AND form share this exactly ──── */
.reg-wrap {
    width: 100%;
    box-sizing: border-box;
    padding-left: 5em;
    padding-right: 5em;
    max-width: 760px;           /* cap reading width on ultrawide */
}

/* ── Page header ─────────────────────────────────────────────── */
.reg-header {
    margin-bottom: 2.5rem;
}

.reg-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--wp--preset--color--text);
    line-height: 1.2;
    margin: .4rem 0 .75rem;
}

.reg-subtitle {
    font-size: .9375rem;
    color: var(--wp--preset--color--text-secondary);
    max-width: 56ch;
    line-height: 1.6;
    margin: 0;
}

.reg-login-link {
    color: var(--wp--preset--color--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.reg-login-link:hover  { color: #f5d84a; }
.reg-login-link:focus  { outline: 4px solid #FFC107; outline-offset: 2px; border-radius: 2px; }

/* ── Alert banner (assertive, shown on error) ────────────────── */
.reg-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-left: 5px solid #d63638;
    border-radius: 0 8px 8px 0;
    background: rgba(214, 54, 56, .12);
    color: #fce8e8;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 2rem;
}
.reg-alert::before {
    content: "⚠";
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: .05em;
}

/* ── Form container ──────────────────────────────────────────── */
.reg-form {
    display: flex;
    flex-direction: column;
    gap: 0;                      /* fields manage their own spacing */
}

/* ── Individual form field ───────────────────────────────────── */
.reg-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1.75rem;
}

/* ── Label — bold, 18px+ ─────────────────────────────────────── */
.reg-label {
    display: block;
    font-size: 1.125rem;         /* 18px */
    font-weight: 700;
    color: var(--wp--preset--color--text);
    line-height: 1.25;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--heading);
}

.reg-required {
    color: #e8765a;
    margin-left: .2em;
    font-weight: 700;
}

/* ── Hint text (below label, above input) ────────────────────── */
.reg-hint {
    display: block;
    font-size: .8125rem;         /* 13px */
    color: var(--wp--preset--color--text-secondary);
    line-height: 1.45;
    margin-bottom: .15rem;
}

/* ── Input wrapper (for show-password button) ────────────────── */
.reg-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}
.reg-input-wrap .reg-input {
    flex: 1;
    padding-right: 3rem;         /* make room for toggle button */
}

/* ── Text / email / password inputs ─────────────────────────── */
.reg-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;            /* exceeds 48px spec */
    padding: .75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--wp--preset--color--text);
    background: var(--wp--preset--color--bg);
    border: 2px solid #444;      /* thick, high-contrast dark charcoal */
    border-radius: 8px;
    line-height: 1.4;
    transition: border-color var(--wp--custom--duration--fast), box-shadow var(--wp--custom--duration--fast);
    /* No placeholder styling reliance — labels are always visible */
}

.reg-input::placeholder {
    /* Placeholder exists only as a secondary cue, never as a label substitute */
    color: transparent;
}

.reg-input:hover  { border-color: #666; }

.reg-input:focus {
    border-color: #FFC107;
    outline: 4px solid #FFC107;
    outline-offset: 2px;
    box-shadow: none;
}

.reg-input[aria-invalid="true"] {
    border-color: #d63638;
}
.reg-input[aria-invalid="true"]:focus {
    border-color: #FFC107;      /* focus ring always #FFC107 regardless of state */
    outline: 4px solid #FFC107;
    outline-offset: 2px;
}

/* ── Show/hide password toggle ───────────────────────────────── */
.reg-toggle-pw {
    position: absolute;
    right: 0;
    top: 0; bottom: 0;
    width: 3rem;
    background: none;
    border: none;
    border-left: 1px solid #333;
    cursor: pointer;
    color: var(--wp--preset--color--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 0 8px 8px 0;
    transition: background var(--wp--custom--duration--fast);
}
.reg-toggle-pw:hover  { background: rgba(255,255,255,.06); }
.reg-toggle-pw:focus  { outline: 4px solid #FFC107; outline-offset: 2px; border-radius: 0 8px 8px 0; }

/* ── Password strength bar ───────────────────────────────────── */
.reg-strength {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
    min-height: 1.25rem;
}

.reg-strength-bar {
    height: 6px;
    flex: 1;
    border-radius: 3px;
    background: #333;
    overflow: hidden;
    position: relative;
}
.reg-strength-bar::after {
    content: '';
    position: absolute;
    inset-block: 0;
    left: 0;
    width: var(--strength-w, 0%);
    background: var(--strength-c, #555);
    border-radius: 3px;
    transition: width var(--wp--custom--duration--medium), background var(--wp--custom--duration--medium);
}

.reg-strength-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--strength-c, var(--wp--preset--color--text-secondary));
    min-width: 5rem;
    white-space: nowrap;
}

/* ── Confirm-password match indicator ────────────────────────── */
.reg-match-label {
    font-size: .8125rem;
    font-weight: 600;
    margin-top: .3rem;
    min-height: 1.1em;
}
.reg-match-label--ok    { color: #00a32a; }
.reg-match-label--error { color: #d63638; }

/* ── Submit section ──────────────────────────────────────────── */
.reg-submit-wrap {
    margin-top: .5rem;
}

.reg-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    width: 100%;
    min-height: 56px;            /* exceeds 52px spec */
    padding: 0 2rem;
    background: var(--wp--preset--color--accent);
    color: #111;
    border: none;
    border-radius: 8px;
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, transform .12s;
    font-family: var(--wp--preset--font-family--heading);
}
.reg-submit:hover   { background: #f5d84a; color: #111; }
.reg-submit:focus   { outline: 4px solid #FFC107; outline-offset: 3px; background: #f5d84a; }
.reg-submit:active  { transform: scale(.99); }
.reg-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.reg-submit--success { background: #00a32a; margin-top: 1.25rem; }
.reg-submit--success:hover { background: #007a1f; color: #fff; }

.reg-submit-icon { font-size: 1.1rem; }

.reg-submit-hint {
    font-size: .8rem;
    color: var(--wp--preset--color--text-muted);
    text-align: center;
    margin: .6rem 0 0;
    line-height: 1.5;
}
.reg-submit-hint a { color: var(--wp--preset--color--accent); }

/* ── Success panel ───────────────────────────────────────────── */
.reg-success {
    text-align: center;
    padding: 3rem 1rem;
}
.reg-success-icon  { font-size: 3.5rem; display: block; margin-bottom: 1rem; }
.reg-success-title { font-size: 1.75rem; font-weight: 800; color: var(--wp--preset--color--text); margin: 0 0 .75rem; }
.reg-success-body  { font-size: 1rem; color: var(--wp--preset--color--text-secondary); max-width: 44ch; margin: 0 auto 0; line-height: 1.6; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .reg-wrap { padding-left: 3em; padding-right: 3em; }
}
@media (max-width: 640px) {
    .reg-wrap  { padding-left: 1.5em; padding-right: 1.5em; }
    .reg-title { font-size: 1.35rem; }
}
@media (max-width: 400px) {
    .reg-wrap  { padding-left: 1.1em; padding-right: 1.1em; }
}
