/* Keyboard indicators for account, support and dialog controls. */
/* Shared confirmations use the native top layer, including above another dialog.
   The outer dialog remains the existing full-screen dimmer; its card keeps the
   site's palette, trim and spacing. */
html dialog#siteGeneratedPopup.site-generated-popup {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    padding: 20px;
    overflow: auto;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    background: rgba(0, 0, 0, .45) !important;
}
html dialog.site-generated-popup:not([open]) { display: none; }
html dialog.site-generated-popup::backdrop { background: transparent; }

:is(#signInForm, #createAccountForm, #contactSupportForm, #paymentCenter, dialog, .confirmation-overlay, .fulfill-overlay)
    :is(button, input, select, textarea, a[href], summary, [tabindex]):focus-visible,
:is(video[controls], audio[controls]):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Keep text and native form controls inside narrow dialog viewports at zoom. */
:is(dialog.account-security-dialog, .confirmation-box, .fulfill-form) {
    overflow-wrap: anywhere;
}
:is(dialog.account-security-dialog, .confirmation-box, .fulfill-form) :is(input, select, textarea) {
    min-width: 0;
    max-width: 100%;
}

@media (forced-colors: active) {
    :is(dialog, .confirmation-overlay, .fulfill-overlay) :focus-visible {
        outline-color: Highlight;
    }
}
