/* Page sheet for register.php. Linked after style.css by includes/css.php,
   so these rules win ties against the shared sheet. */

/* .form-msg colours + .register-card width are shared in style.css;
   register's message sits above the form, so only the top margin differs. */
.form-msg { margin: 14px 0 0; }

.auth-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 22px;
    border-bottom: 1px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.18s, border-color 0.18s;
}
.auth-tab:hover { color: var(--text-main); }
.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Inline field validation ───────────────────────── */
.field {
    position: relative;
    margin: 10px 0;
}
.field input { margin: 0; padding-right: 40px; }
.field.field--password input { padding-right: 76px; } /* room for eye + tick */

.field-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    pointer-events: none;
    line-height: 0;
}
.field.field--password .field-icon { right: 42px; }
.field.is-touched.is-valid   .field-icon-ok  { display: block; color: var(--sage); }
.field.is-touched.is-invalid .field-icon-bad { display: block; color: var(--rust); }

/* Color the input border to match the validation state */
.field.is-touched.is-valid   input { border-color: rgba(111,143,95,0.45); }
.field.is-touched.is-invalid input { border-color: rgba(181,82,79,0.5); }

.field-hint {
    display: none;
    margin: 4px 4px 0;
    font-size: 0.74rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}
.field.is-touched.is-invalid .field-hint { display: block; color: var(--rust); }

/* ── "Keep me signed in" (sign-in only) ───────────── */
/* Every property that style.css sets on a bare `input` (full width, the
   12px padding, the dark box, the 10px margins) has to be undone here,
   or the checkbox renders as a text field. */
.keep-signed {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 6px 2px 0;
    /* The whole label is the hit area, and a 16px box on a phone is not
       a tappable one. This is the option that exists FOR phones, so it
       gets a finger-sized target rather than a mouse-sized one. */
    min-height: 44px;
    font-size: 0.82rem;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    transition: color 0.18s;
}
.keep-signed:hover { color: var(--text-main); }
.keep-signed input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    accent-color: var(--accent);
    cursor: pointer;
}
.keep-signed input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Strength meter (richer) ──────────────────────── */
.strength-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 4px 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    min-height: 14px;
}
.strength-label { transition: color 0.2s; }
.strength-label.lvl-1 { color: var(--rust); }
.strength-label.lvl-2 { color: var(--gold); }
.strength-label.lvl-3 { color: #8aa07c; }
.strength-label.lvl-4 { color: var(--sage); }
