/*
 * Your global styles here
 */
html,
body {
    height: 100%;
}

html {
    background: white;
}

body {
    margin: 0;
}

/*
 * The verification modal draws its own card and neutralises the platform modal chrome,
 * which left lightning-modal-base's close button anchored to the full-width modal
 * container instead of the card - it floated near the top of the viewport. That button
 * lives in lightning-modal-base's shadow root, so no component stylesheet can reach it;
 * this site-level sheet can. The container is narrowed to the card's width plus the
 * platform content padding, and the button is pulled onto the card and given a visible
 * fill (SLDS colours it white for the dark backdrop).
 * Scoped with :has() so no other modal on the site is affected.
 */
.slds-modal__container:has(.verification-modal-card) {
    width: 548px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: auto !important;
}

.slds-modal__container:has(.verification-modal-card) .slds-modal__close {
    position: absolute !important;
    top: 48px !important;
    right: 48px !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 2 !important;
    fill: #03213f !important;
    color: #03213f !important;
}

/*
 * SLDS sets the white fill on the icon itself via .slds-button__icon, so colouring the
 * button alone leaves a white glyph on the white card. The svg has to be targeted too.
 */
.slds-modal__container:has(.verification-modal-card) .slds-modal__close svg {
    fill: #03213f !important;
}

@media (max-width: 600px) {
    .slds-modal__container:has(.verification-modal-card) .slds-modal__close {
        top: 40px !important;
        right: 40px !important;
    }
}
