.registration-page {
    background: #fff;
}

.registration-form-wrap {
    width: 100%;
    max-width: none;
    padding: 60px 0 90px;
}

.registration-form-wrap > h1 {
    margin: 0 0 30px;
    color: #243f8f;
    font-size: 38px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -.03em;
}

.registration-form {
    color: #243f8f;
}

.form-section {
    margin: 0 0 42px;
}

.form-section h2,
.choice-group legend,
.radio-block legend {
    margin: 0 0 14px;
    color: #243f8f;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.form-section > h2 {
    font-size: 14px;
}

.form-section h3 {
    margin: 28px 0 14px;
    font-size: 14px;
    font-weight: 700;
}

.form-intro,
.form-notice {
    max-width: 790px;
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.45;
    color: #243f8f;
}

.form-intro a {
    text-decoration: underline;
}

.form-notice {
    padding: 16px 18px;
    border-left: 3px solid #1ba9e1;
    background: #f6f9ff;
}

.form-notice-small {
    margin-top: 20px;
    font-size: 12px;
}

.form-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-2-1 {
    grid-template-columns: 2fr 1fr;
}

.field {
    min-width: 0;
}

.field-half {
    max-width: calc(50% - 6px);
}

.field-medium {
    max-width: 420px;
    margin: 0 0 12px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #8ca4d3;
    border-radius: 24px;
    background: #fff;
    color: #243f8f;
    font: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field input,
.field select {
    height: 42px;
    padding: 0 16px;
}

.field textarea {
    min-height: 130px;
    padding: 14px 16px;
    border-radius: 18px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #243f8f;
    opacity: 1;
}

.field select {
    appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, #243f8f 50%),
        linear-gradient(135deg, #243f8f 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 18px,
        calc(100% - 14px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #243f8f;
    box-shadow: 0 0 0 2px rgba(36, 63, 143, .08);
}

.choice-group,
.radio-block {
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
    margin-bottom: 16px;
}

.choice-item,
.stacked-radio,
.privacy-choice,
.inline-radios label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
}

.choice-item input,
.stacked-radio input,
.privacy-choice input,
.inline-radios input {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #243f8f;
}

.radio-block {
    margin-top: 25px;
}

.inline-radios {
    display: flex;
    gap: 30px;
}

.stacked-radio {
    max-width: 790px;
    margin-bottom: 10px;
}

.privacy-choice {
    max-width: 840px;
    margin-bottom: 16px;
}

.conditional-field[hidden],
.visa-support[hidden] {
    display: none !important;
}

.visa-support {
    margin-top: 26px;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #243f8f;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: default;
}

.form-dev-note {
    margin: 10px 0 0;
    font-size: 11px;
    font-style: italic;
    color: #7382aa;
}

@media (max-width: 900px) {
    .registration-form-wrap {
        padding-top: 48px;
    }

    .form-grid-3,
    .form-grid-2,
    .form-grid-2-1 {
        grid-template-columns: 1fr 1fr;
    }

    .choice-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {

    .registration-form-wrap {
        width: 100%;
        max-width: none;
        padding: 40px 0 65px;
    }

    /*
    |--------------------------------------------------------------------------
    | ALL FORM GRIDS = 1 FIELD PER ROW
    |--------------------------------------------------------------------------
    */

    .form-grid,
    .form-grid-3,
    .form-grid-2,
    .form-grid-2-1 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /*
    |--------------------------------------------------------------------------
    | DIET OPTIONS
    |--------------------------------------------------------------------------
    */

    .choice-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /*
    |--------------------------------------------------------------------------
    | FIELDS
    |--------------------------------------------------------------------------
    */

    .field,
    .field-half,
    .field-medium {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .field input,
    .field select {
        width: 100%;
        height: 46px;
        font-size: 14px;
    }

    .field textarea {
        width: 100%;
        min-height: 140px;
        font-size: 14px;
    }

    /*
    |--------------------------------------------------------------------------
    | TEXT
    |--------------------------------------------------------------------------
    */

    .registration-form-wrap > h1 {
        font-size: 32px;
        line-height: 1.1;
    }

    .form-section {
        margin-bottom: 36px;
    }

    .form-intro,
    .form-notice,
    .choice-item,
    .stacked-radio,
    .privacy-choice,
    .inline-radios label {
        font-size: 13px;
        line-height: 1.45;
    }

    /*
    |--------------------------------------------------------------------------
    | YES / NO
    |--------------------------------------------------------------------------
    */

    .inline-radios {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    /*
    |--------------------------------------------------------------------------
    | SUBMIT
    |--------------------------------------------------------------------------
    */

    .form-submit {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {

    .registration-form-wrap > h1 {
        font-size: 28px;
    }

    .field input,
    .field select {
        padding-left: 14px;
        padding-right: 38px;
    }

    .form-error-summary,
    .form-notice {
        padding: 14px;
    }

    .has-error-group {
        margin-left: 0;
        margin-right: 0;
    }
}

/* =========================================================
   FLOATING LABELS
   Append this to the end of assets/css/forms.css
   ========================================================= */

.registration-form .field {
    position: relative;
}

/*
 * The label text is injected in data-floating-label by registration.js.
 * It appears when the field has focus or contains a value.
 */
.registration-form .field::before {
    content: attr(data-floating-label);
    position: absolute;
    z-index: 2;
    top: -6px;
    left: 13px;
    max-width: calc(100% - 26px);
    padding: 0 5px;
    background: #fff;
    color: #243f8f;
    font-size: 9px;
    line-height: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, color .15s ease;
}

.registration-form .field.floating-active::before,
.registration-form .field:focus-within::before {
    opacity: 1;
    transform: translateY(0);
}

/* Hide the placeholder while a field has focus, so the floating label takes over. */
.registration-form .field:focus-within input::placeholder,
.registration-form .field:focus-within textarea::placeholder {
    color: transparent;
}

/* Keep enough room so text never collides with the floating label. */
.registration-form .field.floating-active input,
.registration-form .field:focus-within input,
.registration-form .field.floating-active select,
.registration-form .field:focus-within select {
    padding-top: 3px;
}

.registration-form .field.floating-active textarea,
.registration-form .field:focus-within textarea {
    padding-top: 18px;
}

/*
 * For selects, the first disabled option is the placeholder.
 * Once another option is selected, only the selected value remains inside.
 */
.registration-form .field.floating-active select {
    color: #243f8f;
}

/* Error state: floating label follows the same red visual language. */
.registration-form .field.has-error::before {
    color: #b42318;
}

/*
 * If an error message sits directly below a floating field, keep a little
 * breathing room from the label/input.
 */
.registration-form .field.floating-active .field-error,
.registration-form .field:focus-within .field-error {
    margin-top: 7px;
}

@media (max-width: 600px) {
    .registration-form .field::before {
        top: -6px;
        left: 14px;
        font-size: 9px;
    }
}
