/*
 * Login and registration of site CSN on phones, as drawn in the Figma design "CSN - Review" (frames CSN-M-Portal-Login and
 * CSN-M-Portal-Register, 390px): the hero is the header and the form sits on a white sheet that overlaps it by 16px. Loaded by
 * sites/csn/frontend/auth/{login,register}.blade.php with media="(max-width: 767.98px)": on PC both pages keep the original CSN look
 * (the default markup), so nothing here applies there.
 */
.csn-auth-page {
    color: #2d4059; /* Text 1 */
}

.csn-auth-page .app-auth-wrapper,
.csn-auth-page .app-auth-wrapper .container-fluid {
    height: auto !important;
    min-height: 100vh;
}

.csn-auth-page .auth-wrapper {
    display: block;
    padding: 0 !important;
}

/* ---- Header: the hero of the PC page, redrawn ---- */
.csn-auth-page .auth-left-col {
    display: block;
    padding: 0;
}

.csn-auth-page .auth-left-body {
    display: none;
}

.csn-m-hero {
    background: linear-gradient(180deg, #10103e 0%, #1739e5 100%);
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 256px;
    justify-content: flex-end;
    padding: 24px 24px 40px;
    position: relative;
}

.csn-m-mark {
    background-color: #f1f6f8;
    height: 40px;
    -webkit-mask: url(images/csn-logo.svg) center / contain no-repeat;
    mask: url(images/csn-logo.svg) center / contain no-repeat;
    position: absolute;
    right: 24px;
    top: 24px;
    width: 35px;
}

.csn-m-hero h2 {
    color: #f1f6f8;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -.8px;
    line-height: 32px;
    margin: 0;
}

.csn-m-hero p {
    color: #fff;
    font-size: 14px;
    line-height: 18px;
    margin: -16px 0 0;
}

/* ---- Sheet ---- */
.csn-auth-page .auth-right-col {
    background: #fff;
    border-radius: 16px 16px 0 0 !important;
    display: block !important;
    margin-top: -16px;
    padding: 24px 24px 40px;
    position: relative;
}

.csn-auth-page .auth-right-col > .d-flex {
    margin: 0 !important;
}

.csn-auth-page .auth-right-col > .auth-body {
    padding: 0 !important;
}

.csn-auth-page .csn-brand {
    display: none;
}

.csn-m-tabs {
    background: #f5f6f9;
    border-radius: 12px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, .02);
    display: flex;
    margin-bottom: 40px;
    padding: 4px;
}

.csn-m-tabs > * {
    align-items: center;
    border-radius: 8px;
    color: var(--csn-text-default, #10103e);
    display: flex;
    flex: 1;
    font-size: 16px;
    height: 44px;
    justify-content: center;
    line-height: 20px;
    text-decoration: none;
}

.csn-m-tabs .active {
    background: #fff;
    color: #1739e5;
    font-weight: 600;
}

/* ---- Form ---- */
.csn-auth-page .auth-form .email,
.csn-auth-page .auth-form .password {
    margin-bottom: 16px !important;
    position: relative;
}

.csn-auth-page .auth-form .form-group {
    position: relative;
}

.csn-auth-page .auth-form .form-label {
    color: #2d4059;
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
    margin: 0 0 4px;
}

.csn-auth-page .auth-form .form-control {
    background-color: #fff; /* not the shorthand: .form-select keeps its arrow */
    border: 0;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px var(--csn-border-default, #e6eef2);
    color: #2d4059;
    font-size: 14px;
    height: 48px;
    line-height: 18px;
    outline: 0;
    padding: 0 16px;
}

.csn-auth-page .auth-form .form-control:focus {
    box-shadow: inset 0 0 0 1px var(--csn-primary, #1739e5);
}

.csn-auth-page .auth-form .form-control.is-invalid {
    box-shadow: inset 0 0 0 1px var(--csn-danger-error, #bf1000);
}

.csn-auth-page .auth-form .form-control::placeholder {
    color: #adbac0; /* Grey 2 */
    opacity: 1;
}

.csn-auth-page .password .form-control {
    padding-right: 48px;
}

/* Forgot password moves under the password, next to "Remember me". */
.csn-auth-page .csn-forgot {
    display: none;
}

.csn-auth-page .auth-form .form-group i[id^="toggle-password"] {
    float: none !important;
    margin: 0 !important;
    position: absolute !important;
    right: 16px !important;
    top: 35px;
}

.csn-auth-page .form-group i[id^="toggle-password"] img {
    height: 16px !important;
    width: 16px !important;
}

.csn-m-remember {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.csn-m-remember label {
    align-items: center;
    color: #7a8799; /* Text 2 */
    cursor: pointer;
    display: flex;
    font-size: 12px;
    gap: 8px;
    line-height: 15px;
    margin: 0;
}

.csn-m-remember input {
    appearance: none;
    background: url(images/icons/checkbox-off.svg) center / 20px no-repeat;
    border: 0;
    flex: none;
    height: 20px;
    margin: 0;
    width: 20px;
}

.csn-m-remember input:checked {
    background-image: url(images/icons/checkbox-on.svg);
}

.csn-m-remember a {
    color: #4b86eb;
    font-size: 12px;
    font-weight: 500;
    line-height: 15px;
    text-decoration: none;
}

.csn-auth-page .auth-form .btn-primary-gradient {
    border-radius: 8px;
    font-size: 14px;
    height: 52px;
    letter-spacing: .35px;
    line-height: 18px;
    margin-top: 24px;
}

.csn-auth-page .auth-form .btn-primary-gradient strong {
    font-family: var(--csn-globalfont, fontRink, "fontRink Fallback");
    font-weight: 600;
}

.csn-auth-page .auth-option {
    font-size: 14px;
}

.csn-auth-page .auth-option label {
    color: #7a8799 !important; /* Text 2; beats .text-gray */
}

/* ---- Registration ---- */
.csn-register-page .auth-wrapper > .auth-right-col {
    padding: 24px 24px 40px !important;
}

.csn-register-page .csn-reg-head,
.csn-register-page .auth-option {
    display: none !important;
}

.csn-register-page .auth-form .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 8px;
}

.csn-register-page .auth-form .row.g-2:has(#signup-name) {
    --bs-gutter-y: 16px;
}

.csn-register-page .auth-form > .row.g-4 {
    --bs-gutter-y: 0;
}

.csn-register-page .auth-form .row > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* 40px between the blocks, 16px between the password fields. */
.csn-register-page .auth-form .col-md-6:has(#signup-company-name),
.csn-register-page .auth-form .col-md-6:has(#signup-password-confirmation) {
    margin-bottom: 40px;
}

.csn-register-page .auth-form .col-md-6:has(#signup-password) {
    margin-bottom: 16px;
}

.csn-register-page .auth-form .col-12.mt-3 {
    margin-top: 0 !important;
}

.csn-register-page .auth-form .col-12.mt-3 + .col-12.mt-3 {
    margin-top: 12px !important;
}

.csn-register-page .auth-form h5 {
    color: #10103e;
    font-family: var(--csn-globalfont, fontRink, "fontRink Fallback");
    font-size: 14px !important;
    font-weight: 600;
    line-height: 18px;
    margin-bottom: 24px !important;
}

.csn-register-page .form-check {
    color: #7a8799; /* Text 2 */
    font-size: 12px;
    line-height: 15px;
    padding-left: 28px;
    position: relative;
}

.csn-register-page .form-check:has(#term_and_conditions) {
    padding-top: 2.5px; /* one line, centred on the 20px box */
}

.csn-register-page .form-check .form-check-input {
    float: none;
    left: 0;
    margin: 0;
    position: absolute;
    top: 0;
}

.csn-register-page .form-check .form-check-label {
    color: #7a8799;
    display: inline !important;
    font-size: 12px;
    line-height: 15px;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.csn-register-page .form-check .terms-link {
    color: #7a8799 !important;
}

.csn-register-page .auth-form > .row.mt-4 {
    margin-top: 40px !important;
}

.csn-register-page #btn-submit {
    border-radius: 8px;
    font-family: var(--csn-globalfont, fontRink, "fontRink Fallback");
    font-size: 14px;
    font-weight: 600;
    height: 52px;
    letter-spacing: .35px;
    line-height: 18px;
    text-transform: uppercase;
}

.csn-register-page #btn-submit + .auth-option,
.csn-register-page .col-lg-4 {
    padding-top: 0 !important;
}

.csn-register-page .auth-form .form-group i[id^="toggle-password"] {
    top: 33px;
}

.csn-register-page .auth-form .form-group i[id^="toggle-password"] img {
    height: 20px !important;
    width: 20px !important;
}

.csn-register-page #password-match-indicator {
    right: 44px !important;
    top: 33px !important;
}

.csn-register-page #password-match-indicator svg {
    height: 20px;
    width: 20px;
}

/* Address, postcode and country are one group of three inputs, 8px apart. */
.csn-register-page .auth-form .mb-3:has(#signup-address) {
    margin-bottom: 8px !important;
}
