/* Home: registration section (MILESTONES 22.R) around the app's form [shortcode_show_register_form] (amerlink-core),
   restyled here only: its markup, fields and script (js/custom.js: MyFormValidate) stay as they are. Every rule is
   scoped to .amf-section, so the form keeps its old look on the other pages. States set by the script:
   .form-create-account.disabled (step 1 done), .form-extra-info-container-inner.disabled (step 2 locked),
   .reg-next-bt-item-container.disabled / .register-bt.disabled (not ready — still clickable: a click shows what is
   missing), .label-validate (messages), .input-validate-item-container img.show (ticks), .amid-bt[data-checked].
   The look chosen on 15.10 (variant A): navy section, the texts on the left, the form in a white card showing one
   step at a time. */

.amf-section {
    --amf-line: #d5dfec;
    --amf-text: #33446a;
    /* The app's button rules (app-overlays.css, body .my-button-1 and its hover with !important) use these; the home
     * page does not define them, which would leave the buttons see-through under the pointer. */
    --color-button1: var(--amh-pink);
    --color-button1-text: #fff;
    --color-button1-border: var(--amh-pink);
    --color-button1-hover: #d90063;
    --color-button1-text-hover: #fff;
    --color-button1-border-hover: #d90063;
    position: relative;
    overflow: hidden;
    padding: clamp(64px, 6vw, 112px) 0;
    color: var(--amf-text);
    isolation: isolate;
}

.amf-inner {
    width: min(100% - 64px, 1510px);
    margin-inline: auto;
}

.amf-eyebrow {
    margin: 0 0 clamp(8px, .7vw, 12px);
    color: var(--amh-pink);
    font-size: clamp(13px, 1vw, 17px);
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.amf-title {
    margin: 0;
    padding: 0;
    color: var(--amh-navy);
    font-family: inherit;
    font-size: clamp(30px, 2.6vw, 50px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.amf-description {
    margin: clamp(12px, 1vw, 18px) 0 0;
    font-size: clamp(16px, 1.15vw, 20px);
    line-height: 1.55;
}

.amf-benefits {
    display: grid;
    gap: 14px;
    margin: clamp(22px, 2vw, 32px) 0 0;
    padding: 0;
    list-style: none;
}

.amf-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    font-size: clamp(15px, 1.05vw, 18px);
    line-height: 1.45;
}

.amf-benefits svg {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    color: var(--amh-pink);
}

.amf-card {
    min-width: 0;
    padding: clamp(22px, 2.2vw, 40px);
    border-radius: 18px;
    background: #fff;
    container: amf-card / inline-size;
}

/* The form's own heading: the section has its own. */
.amf-section .register-header {
    display: none;
}

.amf-section .register-container,
.amf-section .register-container-inner,
.amf-section .register-form {
    margin: 0;
    padding: 0;
    background: none;
}

.amf-section #register-user-form {
    margin: 0;
}

/* ---------- Step headings: number in a circle, label, line. */

.amf-section .register-step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
}

.amf-section .register-step-no p {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    margin: 0;
    border-radius: 50%;
    background: var(--amh-pink);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.amf-section .register-step-label {
    min-width: 0;
}

.amf-section .register-step-label p {
    margin: 0;
    color: var(--amh-navy);
    font-size: clamp(17px, 1.2vw, 20px);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.amf-section .register-step-line-container {
    min-width: 24px;
    flex: 1 1 auto;
}

.amf-section .register-step-line {
    height: 1px;
    background: var(--amf-line);
}

/* ---------- Fields: the message above, the field, its buttons and the tick inside it on the right. */

/* .register-form in front: app-overlays.css (loaded on the home page for the sign-in window) gives these a flex row
 * 385 px wide and absolute buttons. */
.amf-section .register-form .input-item-container {
    position: relative;
    display: grid;
    width: auto;
    min-width: 0;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    margin: 0 0 14px;
    padding: 0;
}

.amf-section .register-form .input-item-container > .label-validate {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 0 6px;
    color: #d6004f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.amf-section .label-validate:empty {
    display: none;
}

.amf-section .register-form .input-item-container > input.input:not([type='radio']),
.amf-section .register-form .input-item-container > select {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 46px 0 16px;
    border: 1.5px solid var(--amf-line);
    border-radius: 10px;
    background-color: #fff;
    box-shadow: none;
    color: #0c1d45;
    font-family: inherit;
    font-size: 16px;
    grid-column: 1 / -1;
    grid-row: 2;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.amf-section .register-form .input-item-container > input::placeholder {
    color: #7b88a4;
    opacity: 1;
}

.amf-section .register-form .input-item-container > input.input:not([type='radio']):focus,
.amf-section .register-form .input-item-container > select:focus {
    border-color: var(--amh-blue);
    box-shadow: 0 0 0 4px rgba(8, 174, 243, .16);
    outline: none;
}

.amf-section .register-form .input-item-container > input[disabled],
.amf-section .register-form .input-item-container > select[disabled] {
    background-color: #f4f7fb;
    cursor: not-allowed;
}

.amf-section .register-form .input-item-container > select {
    padding-right: 46px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301216a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 18px;
    cursor: pointer;
}

/* Password fields carry two buttons. */
.amf-section .user-pass-item-container > input,
.amf-section .user-pass-repeat-item-container > input,
.amf-section .your-ambassador-name-item-container > input {
    padding-right: 118px;
}

.amf-section .register-form .input-item-container > button {
    position: static;
    z-index: 1;
    display: grid;
    max-width: none;
    width: 38px;
    height: 38px;
    place-items: center;
    margin: 0 2px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #5a6b8c;
    cursor: pointer;
    grid-row: 2;
}

.amf-section .register-form .input-item-container > button:hover,
.amf-section .register-form .input-item-container > button:focus-visible {
    background: #eef3fa;
    color: var(--amh-navy);
}

.amf-section .register-form .input-item-container > .gen-rand-pass-bt {
    grid-column: 2;
}

.amf-section .register-form .input-item-container > .show-password-bt,
.amf-section .register-form .input-item-container > .search-ambassador-bt {
    grid-column: 3;
}

.amf-section .register-form .input-item-container > .input-validate-item-container {
    z-index: 1;
    display: flex;
    width: 20px;
    height: auto;
    margin: 0 14px 0 4px;
    grid-column: 4;
    grid-row: 2;
}

.amf-section .input-validate-item-container img {
    display: none;
    width: 20px;
    height: 20px;
}

.amf-section .input-validate-item-container img.show {
    display: block;
    visibility: visible;
}

/* ---------- Choices (gender, student / student-athlete): pills. */

.amf-section .radio-item-container-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}

.amf-section .radio-item-container-inner > .extra-label {
    min-width: 64px;
    color: var(--amh-navy);
    font-size: 15px;
    font-weight: 700;
}

.amf-section .radio-item-container-inner > .label-validate {
    width: 100%;
    order: -1;
    color: #d6004f;
    font-size: 13px;
    font-weight: 600;
}

.amf-section .group-radio-container {
    position: relative;
}

.amf-section .group-radio-container input[type='radio'] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.amf-section .group-radio-container label {
    display: inline-flex;
    height: 44px;
    align-items: center;
    padding: 0 20px;
    border: 1.5px solid var(--amf-line);
    border-radius: 999px;
    background: #fff;
    color: var(--amf-text);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.amf-section .group-radio-container label:hover {
    border-color: var(--amh-pink);
}

.amf-section .group-radio-container input:checked + label {
    border-color: var(--amh-pink);
    background: var(--amh-pink);
    color: #fff;
}

.amf-section .group-radio-container input:focus-visible + label {
    box-shadow: 0 0 0 4px rgba(8, 174, 243, .25);
}

.amf-section .group-radio-container input[disabled] + label {
    cursor: not-allowed;
}

.amf-section .radio-item-container-inner > .input-validate-item-container {
    display: flex;
}

/* ---------- Ambassador: hint, field with a search button, the list of matches to tick. */

.amf-section .ambassador-id-info-label {
    margin: 4px 0 8px;
    color: #5a6b8c;
    font-size: 13px;
    line-height: 1.4;
}

.amf-section .register-form .ambassadors-list-container {
    display: block;
}

.amf-section .ambas-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.amf-section .ambas-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--amf-line);
    border-radius: 10px;
    font-size: 15px;
}

.amf-section .amid-bt {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 2px solid #b8c3d6;
    border-radius: 50%;
    cursor: pointer;
}

.amf-section .amid-bt[data-checked='true'] {
    border-color: var(--amh-pink);
    background: var(--amh-pink);
}

.amf-section .amid-bt[data-checked='true']::after {
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    content: '';
    transform: rotate(45deg);
}

/* ---------- Newsletter and terms: the box first, the text beside it. */

.amf-section .terms-item-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 12px;
    margin: 6px 0 14px;
}

.amf-section .terms-item-container > input[type='checkbox'] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    order: -1;
    margin: 2px 0 0;
    accent-color: var(--amh-pink);
    cursor: pointer;
}

.amf-section .terms-policy-container-inner {
    min-width: 0;
    flex: 1 1 0;
}

.amf-section .terms-policy-container-inner p {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

.amf-section .terms-policy-container-inner p + p::before {
    content: ' ';
}

.amf-section .terms-policy-container-inner a {
    color: var(--amh-pink);
}

.amf-section .terms-item-container > .label-validate {
    width: 100%;
    order: 3;
    margin: 0;
}

/* ---------- Buttons. "Not ready" only dims them: a click shows what is missing. */

.amf-section .register-form .reg-next-bt-item-container {
    display: flex;
    justify-content: flex-end;
    margin: 6px 0 0;
}

.amf-section .reg-next-bt,
.amf-section .register-bt {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
    padding: 0 34px;
    border: 0;
    border-radius: 8px;
    background: var(--amh-pink);
    box-shadow: 0 10px 22px rgba(245, 0, 114, .18);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, opacity .2s ease, translate .2s ease;
}

.amf-section .reg-next-bt::after {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    content: '→';
}

.amf-section .reg-next-bt:hover,
.amf-section .reg-next-bt:focus-visible,
.amf-section .register-bt:hover,
.amf-section .register-bt:focus-visible {
    background: #d90063;
    color: #fff;
    translate: 0 -2px;
}

.amf-section .reg-next-bt-item-container.disabled .reg-next-bt,
.amf-section .register-bt.disabled {
    opacity: .55;
}

.amf-section .reg-next-bt:focus-visible,
.amf-section .register-bt:focus-visible,
.amf-section .reg-back-bt:focus-visible {
    outline: 3px solid var(--amh-blue);
    outline-offset: 2px;
}

.amf-section .form-extra-info-container-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--amf-line);
}

.amf-section .form-extra-info-container-submit > .terms-item-container {
    max-width: 440px;
    flex: 1 1 280px;
    margin: 0;
}

.amf-section .submits-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.amf-section .reg-back-bt {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 2px solid var(--amf-line);
    border-radius: 8px;
    background: #fff;
    color: var(--amh-navy);
    cursor: pointer;
    font-size: 18px;
}

.amf-section .reg-back-bt:hover {
    border-color: var(--amh-navy);
}

.amf-section .register-reset-bt,
.amf-section .spacer-item-container,
.amf-section .user-gen-pass-container:empty {
    display: none;
}

/* ---------- Navy section, the texts on the left, the form in a white card showing one step at a time. */

.amf-section {
    background:
        radial-gradient(ellipse 55% 70% at 90% 10%, rgba(43, 98, 178, .5) 0%, rgba(43, 98, 178, 0) 70%),
        linear-gradient(180deg, #0b2d64 0%, #082656 60%, #071f49 100%);
    color: rgba(255, 255, 255, .88);
}

.amf-section .amf-inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: clamp(32px, 4.5vw, 96px);
}

.amf-section .amf-intro {
    position: sticky;
    top: 120px;
    padding-top: 12px;
}

.amf-section .amf-title {
    color: #fff;
}

.amf-section .amf-benefits li {
    color: rgba(255, 255, 255, .9);
}

.amf-section .amf-card {
    box-shadow: 0 30px 70px rgba(0, 8, 40, .35);
    color: var(--amf-text); /* not the white of the section */
}

/* One step at a time (the script marks the step that is not in use). */
.amf-section .form-create-account.disabled,
.amf-section .form-extra-info-container:has(> .form-extra-info-container-inner.disabled) {
    display: none;
}

@container amf-card (min-width: 640px) {
    .amf-section .form-extra-info-container-inner {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
}

@media (max-width: 1080px) {
    .amf-section .amf-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .amf-section .amf-intro {
        position: static;
    }

}

@media (max-width: 700px) {
    .amf-inner {
        width: min(100% - 36px, 660px);
    }

    .amf-card {
        padding: 20px 16px;
    }

    .amf-section .form-extra-info-container-submit,
    .amf-section .submits-container {
        width: 100%;
    }

    .amf-section .submits-container .register-bt {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .amf-section .reg-next-bt,
    .amf-section .register-bt,
    .amf-section .group-radio-container label {
        transition: none;
    }
}
