/*
 * Registration, as a split screen: a dark panel on the left carrying the brand and
 * the step rail, the form itself on the right.
 *
 * The form is driven by jQuery Steps, which needs the blade to alternate `h3` and
 * `fieldset` at the top level and then rewrites that into its own markup:
 *
 *   .wizard                                 the form element itself
 *   .wizard > .steps > ul > li > a          the step buttons
 *   .wizard > .content > .title / .body     the h3 and the fieldset
 *   .wizard > .actions > ul > li > a        previous / next / finish
 *
 * None of that is ours to change. The layout is reached instead by giving the form
 * `display: contents`, which drops it out of the box tree and hands its three
 * children straight to the grid below - so `.steps` can sit in the left column
 * while `.content` and `.actions` fill the right, with no markup moved and no
 * plugin behaviour touched.
 */

:root {
    --rc-ink: #0f172a;
    --rc-muted: #64748b;
    --rc-line: #e2e8f0;
    --rc-line-soft: #f1f5f9;
    --rc-accent: #4f46e5;
    --rc-accent-dark: #4338ca;
    --rc-accent-soft: rgba(79, 70, 229, .08);
    --rc-ok: #10b981;
    --rc-panel: #111827;
}

/* The auth layout pads its content column; this screen runs edge to edge. */
.reg-flush {
    padding: 0 !important;
}

.reg-flush > .row { margin: 0; }

/*
 * The auth layout floats Sign In and the language picker over the top-right
 * corner in white, for a page that is white behind them everywhere else. Here
 * that corner is the form panel, so they have to come down to ink.
 */
.reg-flush .tw-absolute a.tw-text-white,
.reg-flush .tw-absolute span.tw-text-white {
    color: var(--rc-muted) !important;
}

.reg-flush .tw-absolute a.tw-text-white:hover {
    color: var(--rc-ink) !important;
}

/* --------------------------------------------------------------- the split */

.reg-shell {
    display: grid;
    grid-template-columns: 372px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "brand   content"
        "rail    content"
        "rail    actions";
    min-height: 100vh;
    background: #fff;
    font-size: 14px;
    color: var(--rc-ink);
}

/* Hands .steps, .content and .actions to the grid above. */
.reg-shell .wizard {
    display: contents;
}

/* ------------------------------------------------------------- left panel */

.reg-brand {
    grid-area: brand;
    padding: 96px 40px 26px;
    color: #fff;
    background: var(--rc-panel);
}

.reg-brand h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.5px;
    color: #fff;
}

.reg-brand p {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .62);
}

.reg-brand .reg-brand-name {
    display: inline-block;
    margin-bottom: 18px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #c7d2fe;
    background: rgba(99, 102, 241, .16);
    border-radius: 999px;
}

/* ------------------------------------------------------- the vertical rail */

.reg-shell .wizard > .steps {
    grid-area: rail;
    width: auto;
    padding: 6px 40px 40px;
    color: #fff;
    background: var(--rc-panel);
}

.reg-shell .wizard > .steps > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* app.css pins each step to a third of a row; here they stack. */
.reg-shell .wizard > .steps > ul > li {
    position: relative;
    width: auto !important;
    float: none;
    margin: 0;
}

/* The thread between the beads. Not drawn past the last one. */
.reg-shell .wizard > .steps > ul > li::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: -6px;
    width: 2px;
    background: rgba(255, 255, 255, .12);
}

.reg-shell .wizard > .steps > ul > li.last::before { display: none; }

.reg-shell .wizard > .steps > ul > li > a,
.reg-shell .wizard > .steps > ul > li > a:hover,
.reg-shell .wizard > .steps > ul > li > a:active {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 9px 0 15px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    color: rgba(255, 255, 255, .48);
    background: transparent;
    border: 0;
    border-radius: 0;
}

/* jQuery Steps hides a "current step:" label in here for screen readers. */
.reg-shell .wizard .audible,
.reg-shell .wizard .current-info {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.reg-shell .wizard > .steps > ul > li > a .number {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, .55);
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 50%;
}

.reg-shell .wizard > .steps > ul > li.current > a,
.reg-shell .wizard > .steps > ul > li.current > a:hover {
    color: #fff;
}

.reg-shell .wizard > .steps > ul > li.current > a .number {
    color: #fff;
    background: var(--rc-accent);
    border-color: var(--rc-accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .22);
}

/* `done` is the plugin's class for a step already filled in. */
.reg-shell .wizard > .steps > ul > li.done > a,
.reg-shell .wizard > .steps > ul > li.done > a:hover {
    color: rgba(255, 255, 255, .82);
}

.reg-shell .wizard > .steps > ul > li.done > a .number {
    font-size: 0;
    color: #06251b;
    background: var(--rc-ok);
    border-color: var(--rc-ok);
}

.reg-shell .wizard > .steps > ul > li.done > a .number::after {
    content: '\f00c';                    /* fa-check */
    font-family: 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    font-size: 11px;
    color: #fff;
}

.reg-shell .wizard > .steps > ul > li.done::before { background: rgba(16, 185, 129, .45); }

.reg-shell .wizard > .steps > ul > li.disabled > a,
.reg-shell .wizard > .steps > ul > li.disabled > a:hover {
    color: rgba(255, 255, 255, .38);
    cursor: default;
}

/* ------------------------------------------------------------ right column */

.reg-shell .wizard > .content {
    grid-area: content;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 64px 56px 24px;
    background: #fff !important;
    border-radius: 0;
    overflow: visible;
}

.reg-shell .wizard > .content > .body {
    width: 100%;
    max-width: 780px;
    height: auto;
    position: relative;
    float: none;
    padding: 0;
}

/* The plugin keeps the h3 as the step title; the head inside each body replaces it. */
.reg-shell .wizard > .content > .title { display: none; }

.reg-shell .reg-step-head {
    margin: 0 0 26px;
}

.reg-shell .reg-step-head h4 {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--rc-ink);
}

.reg-shell .reg-step-head p {
    margin: 7px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--rc-muted);
}

/* ------------------------------------------------------------------ fields */

.reg-shell .form-group { margin-bottom: 20px; }

.reg-shell .form-group > label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--rc-muted);
}

/*
 * Bootstrap welds input-group-addon to the field as a bordered box. The markup
 * stays - the validator's errorPlacement looks for `.input-group` - but the addon
 * is lifted out of the flow and sat inside the field as a plain icon.
 */
.reg-shell .input-group {
    display: block;
    position: relative;
    width: 100%;
}

.reg-shell .input-group > .input-group-addon {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 42px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 13px;
    color: #9aa5b8;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.reg-shell .form-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 14.5px;
    color: var(--rc-ink);
    background: #f8fafc;
    border: 1.5px solid transparent;
    border-bottom-color: var(--rc-line);
    border-radius: 10px 10px 0 0;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.reg-shell .input-group > .form-control { padding-left: 42px; }

.reg-shell .form-control:focus {
    background: #fff;
    border-color: transparent;
    border-bottom-color: var(--rc-accent);
    box-shadow: 0 1px 0 0 var(--rc-accent);
}

.reg-shell .form-control::placeholder { color: #aab3c2; }

/* select2 swaps the select for its own box, which needs the same treatment. */
.reg-shell .input-group .select2-container { width: 100% !important; }

.reg-shell .select2-container--default .select2-selection--single {
    height: 46px;
    background: #f8fafc;
    border: 1.5px solid transparent;
    border-bottom-color: var(--rc-line);
    border-radius: 10px 10px 0 0;
}

.reg-shell .input-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 43px;
    padding-left: 42px;
    line-height: 43px;
    font-size: 14.5px;
    color: var(--rc-ink);
}

.reg-shell .select2-container--default .select2-selection--single .select2-selection__arrow { height: 43px; }

.reg-shell input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--rc-muted);
    background: #f8fafc;
    border: 1.5px dashed var(--rc-line);
    border-radius: 10px;
}

.reg-shell label.error {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #e11d48;
}

.reg-shell .form-control.error { border-bottom-color: #e11d48; }

/* ------------------------------------------------------------ nature picker */

.reg-shell .reg-nature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.reg-shell .reg-nature-card {
    position: relative;
    display: block;
    margin: 0;
    padding: 18px 18px 16px;
    font-weight: 400;
    background: #fff;
    border: 1.5px solid var(--rc-line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
}

.reg-shell .reg-nature-card:hover {
    border-color: #c7d2fe;
    transform: translateY(-2px);
}

.reg-shell .reg-nature-card.is-on {
    border-color: var(--rc-accent);
    background: var(--rc-accent-soft);
}

.reg-shell .reg-nature-card:focus-within {
    border-color: var(--rc-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}

/* The radio still carries the value and the required rule; it is just not drawn. */
.reg-shell .reg-nature-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.reg-shell .reg-nature-ico {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    font-size: 17px;
    color: var(--rc-muted);
    background: var(--rc-line-soft);
    border-radius: 12px;
    transition: background-color .15s ease, color .15s ease;
}

.reg-shell .reg-nature-card.is-on .reg-nature-ico {
    color: #fff;
    background: var(--rc-accent);
}

.reg-shell .reg-nature-text { display: block; }

.reg-shell .reg-nature-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--rc-ink);
}

.reg-shell .reg-nature-blurb {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--rc-muted);
}

.reg-shell .reg-nature-tick {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    background: var(--rc-accent);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .15s ease, transform .15s ease;
}

.reg-shell .reg-nature-card.is-on .reg-nature-tick {
    opacity: 1;
    transform: none;
}

/* ---------------------------------------------- what the choice switches on */

.reg-shell .reg-nature-side {
    margin-top: 18px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid var(--rc-line);
    border-radius: 14px;
}

.reg-shell .reg-nature-side h5 {
    margin: 0 0 13px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--rc-muted);
}

.reg-shell .reg-nature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reg-shell .reg-nature-list.is-hidden { display: none; }

.reg-shell .reg-nature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--rc-ink);
}

.reg-shell .reg-nature-list li i {
    flex: 0 0 14px;
    margin-top: 3px;
    font-size: 10px;
    color: var(--rc-ok);
}

.reg-shell .reg-nature-note {
    margin: 14px 0 0;
    padding-top: 13px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--rc-muted);
    border-top: 1px solid var(--rc-line);
}

.reg-shell .terms_condition {
    font-size: 13.5px;
    color: var(--rc-accent);
}

/* ------------------------------------------------------------- action bar */

.reg-shell .wizard > .actions {
    grid-area: actions;
    width: auto;
    padding: 18px 56px 26px;
    background: #fff;
    border-top: 1px solid var(--rc-line-soft);
    text-align: left;
}

.reg-shell .wizard > .actions > ul {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 780px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reg-shell .wizard > .actions > ul > li { margin: 0; float: none; }

/* Previous sits apart from the pair that moves you on. */
.reg-shell .wizard > .actions > ul > li:first-child { margin-right: auto; }

.reg-shell .wizard > .actions a,
.reg-shell .wizard > .actions a:hover,
.reg-shell .wizard > .actions a:active {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 28px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--rc-ink);
    background: #fff;
    border: 1.5px solid var(--rc-line);
    border-radius: 11px;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}

.reg-shell .wizard > .actions a:hover { border-color: #cbd5e1; background: #f8fafc; }

.reg-shell .wizard > .actions li:last-child a,
.reg-shell .wizard > .actions li:last-child a:hover {
    color: #fff;
    background: var(--rc-accent);
    border-color: var(--rc-accent);
    box-shadow: 0 8px 18px rgba(79, 70, 229, .28);
}

.reg-shell .wizard > .actions li:last-child a:hover { background: var(--rc-accent-dark); }

.reg-shell .wizard > .actions a:active { transform: translateY(1px); }

.reg-shell .wizard > .actions > ul > li.disabled > a,
.reg-shell .wizard > .actions > ul > li.disabled > a:hover {
    color: #cbd5e1;
    background: #fff;
    border-color: var(--rc-line-soft);
    box-shadow: none;
    cursor: default;
}

/* ------------------------------------------------------------------- foot */

.reg-brand-foot {
    margin-top: 26px;
    padding-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.reg-brand-foot a {
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
}

/* --------------------------------------------------------- stacked layout */

@media (max-width: 991px) {
    .reg-shell {
        display: block;
        min-height: 0;
    }

    .reg-shell .wizard { display: block; }

    .reg-brand { padding: 92px 24px 20px; }

    .reg-brand h1 { font-size: 22px; }

    .reg-brand-foot { display: none; }

    /* The rail lies down and keeps only the beads and short labels. */
    .reg-shell .wizard > .steps { padding: 0 12px 20px; }

    .reg-shell .wizard > .steps > ul { display: flex; }

    .reg-shell .wizard > .steps > ul > li { flex: 1 1 0; }

    .reg-shell .wizard > .steps > ul > li::before {
        left: auto;
        right: -50%;
        top: 25px;
        bottom: auto;
        width: 100%;
        height: 2px;
    }

    .reg-shell .wizard > .steps > ul > li > a {
        flex-direction: column;
        gap: 8px;
        padding: 8px 4px;
        font-size: 11.5px;
        text-align: center;
    }

    .reg-shell .wizard > .content { padding: 26px 20px 20px; }

    .reg-shell .reg-step-head h4 { font-size: 18px; }

    .reg-shell .reg-nature-grid { grid-template-columns: minmax(0, 1fr); }

    .reg-shell .wizard > .actions { padding: 16px 20px 24px; }

    .reg-shell .wizard > .actions a { padding: 0 20px; }
}
