/* Student registration form.
 *
 * Layout, spacing and copy come from the Claude Design file "Student
 * Registration". The palette and type are this site's, not the design's, so
 * the form matches every other page:
 *
 *   design #c0212b  ->  --ptde-red #d92a30   (the site's button/accent red)
 *   design Source Sans 3 / Poppins  ->  Poppins  (the site's body face)
 *   design radius 12px card / 8px button  ->  8px card / 0 button (site)
 *
 * The design's neutral ramp is kept as-is: the site has no token for hint or
 * secondary text, and pure black at 20px (the theme default) is too heavy for
 * it. Input borders keep the design's #d8d5d1 rather than the site's #ececed,
 * which is too faint to read as an edge.
 */

/* The page title is the theme's, not this template's: it spans the full content
   width while the card is a centred 560px column, so the two sat on different
   left edges. Constrain the title to the same column. Scoped to the body class
   added in Student_Registration.php — this stylesheet loads site-wide, and an
   unscoped .fl-post-title rule would re-align every post title on the site. */
body.ptde-reg-page .fl-post-title {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

#tutor-registration-wrap.ptde-reg {
    --ptde-red: #d92a30;
    --ptde-red-dark: #b8232a;
    --ptde-ink: #1c1b1a;
    --ptde-label: #2a2827;
    --ptde-muted: #5c5957;
    --ptde-hint: #8a8683;
    --ptde-line: #eeecea;
    --ptde-border: #d8d5d1;

    max-width: 560px;
    margin: 0 auto;
    font-family: Poppins, sans-serif;
}

#tutor-registration-form [x-cloak],
#tutor-registration-wrap [x-cloak] {
    display: none !important;
}

#tutor-registration-wrap.ptde-reg .ptde-reg__lede {
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ptde-muted);
}

/* Card ------------------------------------------------------------------ */

#tutor-registration-wrap .ptde-reg__card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #fff;
    border: 1px solid #ececed;
    border-radius: 8px;
    padding: 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Section headers ------------------------------------------------------- */

#tutor-registration-wrap .ptde-reg__legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ptde-line);
}

#tutor-registration-wrap .ptde-reg__legend--parent {
    margin-top: 8px;
}

#tutor-registration-wrap .ptde-reg__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ptde-red);
    line-height: 1.3;
}

#tutor-registration-wrap .ptde-reg__legend-note {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ptde-muted);
    font-weight: 400;
}

/* Fields ---------------------------------------------------------------- */

#tutor-registration-wrap .ptde-reg__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

#tutor-registration-wrap .ptde-reg__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

#tutor-registration-wrap .ptde-reg__label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ptde-label);
    margin: 0;
}

#tutor-registration-wrap .ptde-reg__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--ptde-border);
    border-radius: 6px;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 16px; /* 16px keeps iOS from zooming the viewport on focus. */
    font-weight: 400;
    line-height: 1.4;
    color: var(--ptde-ink);
    background: #fff;
}

/* The select has to sit flush with the text inputs beside it, so its native
   chrome is replaced with the same box plus a drawn chevron. */
#tutor-registration-wrap .ptde-reg__select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235c5957' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

#tutor-registration-wrap .ptde-reg__input:focus {
    outline: none;
    border-color: var(--ptde-red);
    box-shadow: 0 0 0 3px rgba(217, 42, 48, 0.12);
}

#tutor-registration-wrap .ptde-reg__hint {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ptde-hint);
}

#tutor-registration-wrap .ptde-reg__error {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ptde-red);
}

/* Password reveal ------------------------------------------------------- */

#tutor-registration-wrap .ptde-reg__pw {
    position: relative;
    display: flex;
}

#tutor-registration-wrap .ptde-reg__input--pw {
    padding-right: 68px;
}

#tutor-registration-wrap .ptde-reg__pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ptde-red);
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
}

#tutor-registration-wrap .ptde-reg__pw-toggle:hover {
    color: var(--ptde-red-dark);
}

/* Form-level alert ------------------------------------------------------ */

#tutor-registration-wrap .ptde-reg__alert {
    background: #fbeaeb;
    border: 1px solid #f1c6c9;
    border-radius: 6px;
    padding: 12px 14px;
}

#tutor-registration-wrap .ptde-reg__alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #8f171f;
}

#tutor-registration-wrap .ptde-reg__alert p + p {
    margin-top: 6px;
}

/* Consent, submit, footer ----------------------------------------------- */

#tutor-registration-wrap .ptde-reg__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ptde-muted);
}

#tutor-registration-wrap .ptde-reg__consent label {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
}

#tutor-registration-wrap .ptde-reg__submit {
    width: 100%;
    border: none;
    border-radius: 0; /* Site CTAs are square. */
    background: var(--ptde-red);
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    padding: 14px;
    cursor: pointer;
    margin-top: 4px;
    transition: background-color 0.15s ease;
}

#tutor-registration-wrap .ptde-reg__submit:hover,
#tutor-registration-wrap .ptde-reg__submit:focus {
    background: var(--ptde-red-dark);
}

#tutor-registration-wrap .ptde-reg__footer {
    text-align: center;
    font-size: 14px;
    color: var(--ptde-muted);
}

#tutor-registration-wrap .ptde-reg__footer a {
    font-weight: 600;
    color: var(--ptde-red);
}

#tutor-registration-wrap .ptde-reg__footer a:hover {
    color: var(--ptde-red-dark);
}

/* The card is 560px wide on its own, so it starts feeling cramped inside the
   theme's gutters well before the fields themselves run out of room. */
@media (max-width: 640px) {
    #tutor-registration-wrap .ptde-reg__card {
        padding: 24px 20px;
        gap: 20px;
    }

    #tutor-registration-wrap .ptde-reg__row {
        grid-template-columns: 1fr;
    }
}
