/*
 * Registration layout overrides.
 *
 * The legacy authentication stylesheet limits `.form-form-wrap` to 480px and
 * applies underline-only input styles. Keep every correction inside the
 * registration shell so the login and the panel remain untouched.
 */

.auth-register-shell,
.auth-register-shell *,
.auth-register-shell *::before,
.auth-register-shell *::after {
    box-sizing: border-box;
}

.auth-register-shell {
    display: grid !important;
    grid-template-columns: minmax(320px, 38%) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    align-items: stretch;
    background: #f5f7fb;
}

.auth-register-shell > .register-visual {
    min-width: 0;
    min-height: 100vh;
    padding: clamp(36px, 4vw, 64px);
}

.auth-register-shell > .form-form {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    overflow: visible;
}

/* Remove the fixed 480px legacy wrapper and its fixed viewport height. */
.auth-register-shell .form-form .form-form-wrap {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: clamp(24px, 3vw, 48px) !important;
    align-items: flex-start;
    justify-content: center;
}

/* The theme adds another 40px of padding to this generic container. */
.auth-register-shell .form-form .form-form-wrap > .form-container {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.auth-register-shell .form-form .form-form-wrap > .form-container > .form-content {
    display: block;
    width: 100% !important;
    max-width: 880px;
    min-width: 0;
    height: auto;
    margin: 0 auto !important;
    padding: clamp(24px, 2.5vw, 32px) !important;
    border: 1px solid #e2e6ee;
    border-top: 4px solid #f70000;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(20, 28, 45, .09);
}

.auth-register-shell form,
.auth-register-shell .section,
.auth-register-shell .grid,
.auth-register-shell .form-group,
.auth-register-shell .field-wrapper {
    width: 100%;
    min-width: 0;
}

.auth-register-shell .section {
    padding: 18px;
    margin: 0 0 16px;
    overflow: visible;
}

.auth-register-shell .section h3 {
    margin-bottom: 14px;
}

.auth-register-shell .grid {
    display: grid;
    gap: 16px;
}

.auth-register-shell .section > .grid + .grid {
    margin-top: 16px;
}

.auth-register-shell .cols-1 {
    grid-template-columns: minmax(0, 1fr);
}

.auth-register-shell .cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-register-shell .cols-3 {
    grid-template-columns: minmax(0, 1.35fr) minmax(110px, .55fr) minmax(0, 1fr);
}

.auth-register-shell .grid > *,
.auth-register-shell .form-group {
    min-width: 0;
}

.auth-register-shell .form-group {
    margin: 0;
}

.auth-register-shell .form-group label {
    display: block;
    margin: 0 0 7px;
    color: #172039;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
}

/* Beat the higher-specificity input rules from authentication/form-1.css. */
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
}

.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input input,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input select,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input textarea {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #dce1ea;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #172039;
    font-size: .96rem;
    font-weight: 500;
    line-height: normal;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input textarea {
    height: auto;
    min-height: 104px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input input:hover,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input select:hover,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input textarea:hover {
    border-color: #c5ccd8;
}

.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input input:focus,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input select:focus,
.auth-register-shell .form-form .form-form-wrap form .field-wrapper.input textarea:focus {
    border-color: #f70000;
    outline: none;
    box-shadow: 0 0 0 4px rgba(247, 0, 0, .12);
}

.auth-register-shell .iti {
    display: block;
    width: 100%;
    min-width: 0;
}

.auth-register-shell .iti input,
.auth-register-shell .iti input[type="tel"] {
    width: 100%;
    max-width: none;
}

.auth-register-shell .account-type {
    gap: 12px 24px;
}

.auth-register-shell .header-row {
    min-width: 0;
}

.auth-register-shell .header-row .brand img {
    display: block;
    max-width: 100%;
}

.auth-register-shell .btn-auth {
    min-height: 48px;
}

.auth-register-shell .newsletter-consent {
    margin: 0 0 18px;
    padding: 14px 15px;
    border: 1px solid #e4e8ef;
    border-radius: 11px;
    background: #f8f9fc;
}

.auth-register-shell .newsletter-consent .new-control {
    display: flex;
    align-items: flex-start;
    margin: 0;
    color: #242d40;
    font-size: .91rem;
    font-weight: 600;
    line-height: 1.5;
}

.auth-register-shell .newsletter-consent .new-control-indicator {
    flex: 0 0 auto;
    margin-top: 2px;
}

.auth-register-shell .newsletter-consent p {
    margin: 8px 0 0 31px;
    color: #71798a;
    font-size: .8rem;
    line-height: 1.5;
}

.auth-register-shell .newsletter-consent a {
    color: #e63232;
    text-decoration: underline;
}

/* Keep radio controls and consent controls in the shared red brand palette. */
.auth-register-shell .custom-control-input:checked ~ .custom-control-label::before {
    border-color: #f70000 !important;
    background-color: #f70000 !important;
}

.auth-register-shell .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(247, 0, 0, .14) !important;
}

.auth-register-shell .legal-consent {
    position: relative;
    padding: clamp(18px, 2vw, 24px);
    border-color: #dfe4ed;
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.auth-register-shell .legal-consent-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-register-shell .legal-consent-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: rgba(247, 0, 0, .09);
    color: #e63232;
    font-size: 19px;
}

.auth-register-shell .legal-consent-heading h3 {
    margin: 0 0 3px;
    color: #172039;
    font-size: 1rem;
    letter-spacing: .2px;
    text-transform: none;
}

.auth-register-shell .legal-consent-heading p {
    margin: 0;
    color: #71798a;
    font-size: .84rem;
    line-height: 1.45;
}

.auth-register-shell .legal-consent-card {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0 0 12px;
    padding: 17px;
    border: 1px solid #e0e5ed;
    border-radius: 12px;
    background: #fff;
}

.auth-register-shell .legal-consent-required {
    border-color: rgba(230, 50, 50, .30);
    border-left: 4px solid #ed3a3a;
    background: #fffafa;
}

.auth-register-shell .consent-badge {
    position: absolute;
    top: 12px;
    right: 13px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef1f6;
    color: #60697b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .45px;
    line-height: 1;
    text-transform: uppercase;
}

.auth-register-shell .consent-badge-required {
    background: #ffe8e8;
    color: #c62b2b;
}

.auth-register-shell .legal-check-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: flex-start;
    gap: 11px;
    padding-right: 86px;
}

.auth-register-shell .legal-checkbox {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    border-radius: 5px;
    accent-color: #f70000;
    cursor: pointer;
}

.auth-register-shell .legal-checkbox:focus-visible {
    outline: 3px solid rgba(247, 0, 0, .22);
    outline-offset: 2px;
}

.auth-register-shell .legal-check-row label {
    margin: 0;
    color: #222b3e;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.48;
    cursor: pointer;
}

.auth-register-shell .legal-consent-card > p {
    margin: 7px 0 0 33px;
    color: #737c8e;
    font-size: .8rem;
    line-height: 1.5;
}

.auth-register-shell .legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 13px 0 0 33px;
}

.auth-register-shell .legal-document-link {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid #e2a4a4;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #c72e2e;
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.auth-register-shell .legal-document-link:hover,
.auth-register-shell .legal-document-link:focus-visible {
    border-color: #ed3a3a;
    background: #fff1f1;
    box-shadow: 0 0 0 3px rgba(247, 0, 0, .10);
}

.auth-register-shell .legal-privacy-note {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 9px;
    background: #f2f5f9;
    color: #5e687a;
    font-size: .79rem;
    line-height: 1.5;
}

.auth-register-shell .legal-privacy-note i {
    margin-top: 2px;
    color: #d93232;
}

.auth-register-shell .newsletter-consent.legal-consent-card {
    margin: 0 0 13px;
    padding: 17px;
    border: 1px solid #e0e5ed;
    border-radius: 12px;
    background: #fff;
}

.auth-register-shell .newsletter-consent.legal-consent-card .legal-check-row {
    color: #242d40;
}

.auth-register-shell .newsletter-consent.legal-consent-card .legal-check-row label {
    padding-right: 0;
    font-size: .88rem;
    font-weight: 600;
}

.auth-register-shell .registration-security-note {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 11px 13px;
    border: 1px solid #dce8df;
    border-radius: 10px;
    background: #f3faf5;
    color: #52645a;
    font-size: .77rem;
    line-height: 1.45;
}

.auth-register-shell .registration-security-note > i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: #e0f3e5;
    color: #238247;
}

.auth-register-shell .registration-security-note span {
    display: grid;
    gap: 1px;
}

.auth-register-shell .registration-security-note strong {
    color: #28563a;
    font-size: .81rem;
}

.auth-register-shell .register-submit {
    display: block;
    width: 100%;
    margin: 0;
    box-shadow: 0 9px 20px rgba(247, 0, 0, .17);
}

body.form .legal-modal .modal-content,
body.form #privacyModal .modal-content {
    overflow: hidden;
    border: 0;
    border-top: 4px solid #f70000;
    border-radius: 14px;
    box-shadow: 0 20px 55px rgba(20, 28, 45, .20);
}

body.form .legal-modal .modal-header,
body.form #privacyModal .modal-header {
    align-items: center;
    border-bottom-color: #e7eaf0;
}

body.form .legal-modal .modal-body,
body.form #privacyModal .modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding: 22px 25px;
}

body.form .legal-document {
    color: #384154;
    font-size: .92rem;
    line-height: 1.7;
}

body.form .legal-document h1,
body.form .legal-document h2,
body.form .legal-document h3,
body.form .legal-document h4 {
    margin: 1.2em 0 .5em;
    color: #172039;
    line-height: 1.3;
}

body.form .legal-document > :first-child {
    margin-top: 0;
}

body.form .legal-modal .modal-footer,
body.form #privacyModal .modal-footer {
    border-top-color: #e7eaf0;
    background: #fafbfc;
}

@media (max-width: 1100px) {
    .auth-register-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-register-shell > .register-visual {
        min-height: 0;
        padding: 30px clamp(20px, 5vw, 48px);
    }

    .auth-register-shell .register-visual h1 {
        max-width: 620px;
        margin-top: 12px;
        font-size: clamp(28px, 4vw, 36px);
    }

    .auth-register-shell .register-visual p {
        max-width: 720px;
        margin-bottom: 0;
    }

    .auth-register-shell .register-benefits,
    .auth-register-shell .register-visual-footer {
        display: none;
    }

    .auth-register-shell > .form-form,
    .auth-register-shell .form-form .form-form-wrap {
        min-height: 0 !important;
    }
}

@media (max-width: 900px) {
    .auth-register-shell .cols-2,
    .auth-register-shell .cols-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575px) {
    .auth-register-shell > .register-visual {
        padding: 24px 18px;
    }

    .auth-register-shell .register-visual h1 {
        font-size: 28px;
    }

    .auth-register-shell .register-visual p {
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-register-shell .form-form .form-form-wrap {
        padding: 12px !important;
    }

    .auth-register-shell .form-form .form-form-wrap > .form-container > .form-content {
        padding: 20px 16px !important;
        border-radius: 13px;
    }

    .auth-register-shell .section {
        padding: 15px;
    }

    .auth-register-shell .header-row {
        align-items: center;
        flex-wrap: wrap;
    }

    .auth-register-shell .header-row .brand img {
        width: 150px;
    }

    .auth-register-shell .account-type {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-register-shell .legal-consent-card {
        padding: 15px 13px;
    }

    .auth-register-shell .legal-check-row {
        padding-top: 25px;
        padding-right: 0;
    }

    .auth-register-shell .legal-actions,
    .auth-register-shell .legal-consent-card > p {
        margin-left: 0;
    }

    .auth-register-shell .legal-document-link {
        width: 100%;
        justify-content: center;
    }
}
