/* === ICBC custom styles === */

:root {
    --primary: #00AEEF; /* designs list this color as CTA instead of primary */
    --primaryDarken: rgba(0, 174, 239, 0.8);
    --secondary: #0075C9;
    --cta: #8526FF;
    --headerBackground: #00AEEF; /* designs list this color as primary */
    --footerBackground: #272727;
    --headerBackground: var(--primary);
    --headerBottomStroke: var(--cta);
    --iconColor: #B3ECFF;
}

.mainHeader--thick img {
    margin-bottom: 2.5%;
    max-width: 30em;
}

.mainHeader--thick {
    background-color: var(--headerBackground);
}

#thinHeader .logo {
    margin-bottom: 0 !important;
}

[data-page="paymentUnsuccessful"] .startPaymentUnsuccessful__actions {
    display: flex;
    justify-content: center;
}

[data-page="paymentUnsuccessful"] .startPaymentUnsuccessful__retry {
    order: 2;
}

[data-page="paymentUnsuccessful"] .startPaymentUnsuccessful__cancel {
    display: none;
}

[data-page="verifyRegistrant"] .k2doLogo {
    display: block;
    white-space: nowrap;
    font-family: 'Roboto' !important
}

[data-page="welcome"] .k2doLogo {
    display: block;
    white-space: nowrap;
    font-family: 'Roboto' !important
}

[data-page="testPrimer"] .form-check, [data-page="testInfo"] .form-check {
    text-align: center;
}

.resultsGraphics figcaption {
    margin: 0 auto;
    text-align: center;
    width: 75%;
}

[data-page="genericError"] .simplePage__text {
    text-align: left;
}

[data-page="invalidLinkCompleted"] #customerCareCTA {
    display: none;
}

[data-page="invalidLinkCompleted"] .simplePage__text,
[data-page="invalidLinkCompleted"] p {
    text-align: center;
}

[data-page="testInvalidAction"] #login {
    display: none;
}

[data-page="applicantRegistrationForm"] h1 nobr {
    display: none;
}

[data-page="applicantRegistrationForm"].proxyForm #email {
    display: none;
}

.confirmationScreen__card .card-body {
    display: flex;
    flex-direction: column;
}

.confirmationScreen__card .confirmationScreen__identity[data-type="ssn"] {
    order: 5;
}

.confirmationScreen__card #language {
    order: 6;
}

.confirmationScreen__card .confirmationScreen__identity[data-type="dln"] {
    order: 7;
}

.confirmationScreen__card .confirmationScreen__identity[data-type="dlnIcn"] {
    order: 7;
}

.confirmationScreen__card .confirmationScreen__identity[data-type="dlnOrigin"] {
    order: 8;
}

[data-page="testResultsGraphical"] .study-guide-btn {
    /* Replicate .btn-block rules */
    display: block;
    width: 100%;
}

[data-page="testResultsGraphical"] .far, [data-page="testResultsGraphical"] .fa {
    --primary: #097881;
}

[data-page="testResultsGraphical"] .resultsGraphical__subGraphicalData:first-child::after {
    content: '|';
}

[data-page="testResultsGraphical"] .resultsGraphical__subGraphicalData::after {
    content: '';
}

[data-page="startPaymentRefund"] .simplePage__heading, [data-page="paymentCanceled"] .simplePage__heading,
[data-page="customerCareConfirmation"] .simplePage__heading {
    font-weight: unset;
}

.simplePage__heading {
    font-weight: bold;
}

    .simplePage__heading b {
        font-weight: bold;
    }

#cityStateZip #zip {
    margin-left: 4px;
}

.btn {
    --primary: var(--cta);
    --primaryDarken: #4328A9;
    --linkColor: var(--primary);
}

a {
    --linkColor: var(--secondary);
}

.results--graphical a:not(.btn) {
    color: var(--linkColor);
}

footer small a {
    color: white;
}

input[type="checkbox"] {
    accent-color: var(--cta);
}

.attestation__ruleCounter,
.site__subheading {
    color: black;
}

[data-test-id="confirmation-label"],
[data-page="testInfo"] .form-check-label,
[data-page="applicantRegistrationForm"] label[for="IdDescription"] {
    font-weight: normal;
}

[data-page="applicantRegistrationForm"] #IdDescription {
    display: none;
}

[data-page="testResultsGraphical"] .resultsBin__header {
    background-color: var(--cta);
    text-align: center;
}

[data-page="testResultsGraphical"] .resultsBin {
    border: 1px solid var(--cta);
}

#selectLanguage button {
    display: none;
}

#officialWebsite {
    text-transform: none;
}

#registrationForm [data-l10n="shared.title.applicantRegistration"],
#registrationForm [data-l10n="shared.title.applicantRegistration.confirmation"] {
    font-weight: bold !important;
}

[data-page="registrationComplete"] .fa-user-check::before {
    content: "\f2f7";
}

[data-page-path*="ViewPeek/RegistrationDynamicForm"] .row--withFields div[class*="col-"],
[data-page-path*="ApplicantRegistration/DynamicForm"] .row--withFields div[class*="col-"] {
    @media (min-width: 768px) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 2rem;
    }
}

.primary-id-tooltip-popup {
    position: fixed;
    z-index: 1050;
    padding: 0.5rem 0.75rem;
    background: #fff;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: none;
    pointer-events: none;
    box-sizing: border-box;
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.primary-id-tooltip-popup ul {
    margin: 0 0 0 1rem;
    padding: 0.25rem 0;
}

.primary-id-tooltip-popup li {
    & + & {
        margin-top: 0.25rem;
    }
}

#registrationForm [data-form-data-key="idDescription"] .itiTextField__customLabel,
#registrationForm [data-form-data-key="idDescription"] label {
    font-weight: bold;
}

[data-page-path$="/VerifyRegistrant"] [data-l10n="site.title.portal"] {
    display: none;
}

/* Realtime under-16 DOB gate (BC). Vue's DynamicForm stamps `is-valid` on the DOB input
   once the date format passes, which paints the green check from `setups/site.css`
   `.form-control.is-valid`. When our under-16 gate engages, swap that icon for the same
   red `fa-times-circle` SVG `setups/site.css` `.form-control.is-invalid` uses, so the
   icon visually matches every other required-field error on the form. We do not add the
   `is-invalid` class itself — that would also reveal Vue's pre-baked
   #DateOfBirth-invalid-feedback "Error: Incorrect Format" message. The .bcUnderAgeInvalid
   class is toggled by setups/britishcolumbia/registrationForm.js and the parallel copy at
   setups/custom/registrationForm.js. The selector includes `#registrationForm` so it
   always wins over `.form-control.is-valid` on specificity. Repeat/size/position are
   restated explicitly: `setups/site.css` `.form-control.is-valid` only sets
   `background-position`, and Bootstrap's own no-repeat/size rules key on `.is-valid` /
   `.is-invalid` — neither of which we add — so without these properties the SVG (whose
   viewBox carries no intrinsic width/height) tiled to fill the textbox. Position matches
   the date-input override at `input[type="date"].form-control.is-valid`. */
#registrationForm input.bcUnderAgeInvalid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='red' viewBox='0 0 600 600'%3E%3Cpath d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.95rem center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
    padding-right: 0 !important;
}