/*
 * Popup modals - one design for every popup of the app (the home page popup design):
 * blurred dim layer, white 4px card, kicker + title + round close button, divider above the buttons.
 * Also the SweetAlert banner style. Loaded by layouts/shared/head-css.blade.php.
 */
/* ======== Popup modals: the home page popup design (.hs-imodal) ======== */
/* the four message colours, used by every popup (SweetAlert and the alert modals): success green, danger red, warning yellow, info blue */
:root {
    --status-success: #1d9e75;
    --status-danger: #dc3545;
    --status-warning: #eaa300;
    --status-info: #378add;
}
.modal {
    z-index: 4500;
    font-family: 'Google Sans', 'Segoe UI', system-ui, sans-serif;
}
body > .modal-backdrop {
    z-index: 4400;
}
body > .modal-backdrop.show {
    opacity: 1;
    background: rgba(16, 24, 40, .38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
/* success / warning / danger / info alert modals never blur the page behind them, even when opened over a popup */
/* ======== SweetAlert popups: the home page popup card, centred (confirmations, success, errors) ======== */
.swal2-container {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    font-family: 'Google Sans', 'Segoe UI', system-ui, sans-serif;
}
.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(16, 24, 40, .38) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.swal2-popup.swal2-modal {
    --swal-kicker: "Message";
    --swal-accent: var(--color-primary, #146C94);
    display: block !important;
    width: min(520px, 100%) !important;
    max-width: 100% !important;
    max-height: calc(100vh - 32px);
    padding: 22px 24px 18px !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: 0 10px 40px 4px rgba(16, 24, 40, .25) !important;
    text-align: left;
    color: #475467;
}
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-question) { --swal-kicker: "Please confirm"; }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-success) { --swal-kicker: "Done"; --swal-accent: var(--status-success); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-error) { --swal-kicker: "Something went wrong"; --swal-accent: var(--status-danger); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-warning) { --swal-kicker: "Warning"; --swal-accent: var(--status-warning); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-info) { --swal-accent: var(--status-info); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-info) { --swal-kicker: "Information"; }
/* the icon: a Hugeicons glyph in a soft tile at the start (left) above the text. The default SweetAlert drawn icons are
   replaced by the matching glyph; a popup that passes its own iconHtml (<i class="hgi ...">) shows that glyph instead. */
.swal2-popup.swal2-modal {
    --swal-glyph: var(--hgi-help-circle);
}
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-success) { --swal-glyph: var(--hgi-checkmark-circle-02); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-error) { --swal-glyph: var(--hgi-cancel-01); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-warning) { --swal-glyph: var(--hgi-alert-02); }
.swal2-popup.swal2-modal:has(.swal2-icon.swal2-info) { --swal-glyph: var(--hgi-information-circle); }
.swal2-popup.swal2-modal .swal2-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 4px;
    background: color-mix(in srgb, var(--swal-accent) 12%, #fff);
    color: var(--swal-accent);
    overflow: hidden;
}
.swal2-popup.swal2-modal .swal2-icon > *,
.swal2-popup.swal2-modal .swal2-icon::after {
    display: none !important;
}
.swal2-popup.swal2-modal .swal2-icon::before {
    content: "";
    display: block !important;
    position: static;
    width: 24px;
    height: 24px;
    border: 0;
    background: currentColor;
    -webkit-mask: var(--swal-glyph) center / contain no-repeat;
    mask: var(--swal-glyph) center / contain no-repeat;
}
.swal2-popup.swal2-modal .swal2-icon:has(.hgi)::before {
    display: none !important;
}
.swal2-popup.swal2-modal .swal2-icon:has(.hgi) > .swal2-icon-content {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: inherit;
}
.swal2-popup.swal2-modal .swal2-icon .hgi {
    font-size: 24px;
    color: inherit;
}
/* icons inside the buttons */
.swal2-popup.swal2-modal .swal2-styled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.swal2-popup.swal2-modal .swal2-styled .hgi {
    font-size: 16px;
}
.swal2-popup.swal2-modal .swal2-title {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
    color: #101828;
}
.swal2-popup.swal2-modal .swal2-title::before {
    content: var(--swal-kicker);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--swal-accent);
}
.swal2-popup.swal2-modal .swal2-html-container {
    margin: 12px 0 4px !important;
    padding: 0 !important;
    font-size: 14.5px;
    line-height: 1.6;
    text-align: left;
    color: #475467;
}
.swal2-popup.swal2-modal .swal2-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 18px 0 0 !important;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}
.swal2-popup.swal2-modal .swal2-styled {
    height: 34px;
    margin: 0 !important;
    padding: 0 20px !important;
    border-radius: 4px !important;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    box-shadow: none !important;
}
.swal2-popup.swal2-modal .swal2-confirm {
    border: 0 !important;
    background: var(--color-primary, #146C94) !important;
    color: #fff !important;
}
.swal2-popup.swal2-modal .swal2-confirm:hover {
    background: var(--color-primary-dark, #034b6d) !important;
}
.swal2-popup.swal2-modal .swal2-cancel,
.swal2-popup.swal2-modal .swal2-deny {
    border: 1px solid #d0d5dd !important;
    background: #fff !important;
    color: #344054 !important;
}
.swal2-popup.swal2-modal .swal2-cancel:hover,
.swal2-popup.swal2-modal .swal2-deny:hover {
    background: #f2f4f7 !important;
}
.swal2-popup.swal2-modal .swal2-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #475467;
}
.swal2-popup.swal2-modal .swal2-close:hover {
    background: #f2f4f7;
    color: #101828;
}
body:has(#success-alert-modal.show, #warning-alert-modal.show, #danger-alert-modal.show, #info-alert-modal.show) > .modal-backdrop.show,
body.swal2-shown > .modal-backdrop.show {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.modal.fade {
    transition: opacity .22s ease;
}
.modal.fade .modal-dialog {
    transform: translateY(12px) scale(.98);
    transition: transform .25s ease;
}
.modal.show .modal-dialog {
    transform: none;
}
.modal-content {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
        border: 0;
    border-radius: 4px !important;
    background: #fff;
    box-shadow: 0 10px 40px 4px rgba(16, 24, 40, .25);
    scrollbar-width: thin;
    scrollbar-color: #b7c2c6 #f1f1f1;
}
.modal-content:has(> .d-flex.justify-content-between:first-child) {
    padding: 22px 24px 18px !important;
}
.modal-content > hr {
    display: none;
}
/* head: kicker + title on the left, round close button on the right */
.modal-content > .d-flex.justify-content-between:first-child {
    align-items: flex-start !important;
    gap: 12px;
    margin-bottom: 12px !important;
}
.gm-kicker {
    display: block;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--color-primary, #146C94);
}
.modal-content > .d-flex:first-child h5,
.modal-content .modal-title {
    margin: 2px 0 0 !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    color: #101828 !important;
}
.modal-content button.rounded-circle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #475467;
    cursor: pointer;
}
.modal-content button.rounded-circle:hover {
    background: #f2f4f7 !important;
}
.modal-content button.rounded-circle .hgi::after {
    margin-left: 0 !important;
    transform: none !important;
}
/* foot: divider line, buttons on the right */
.modal-content > .d-flex.justify-content-end {
    gap: 8px !important;
    margin-top: 18px !important;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}
.modal-content > .d-flex.justify-content-end .btn,
.modal-content > .d-flex.justify-content-end button {
    height: 34px !important;
    min-height: 0;
    padding: 0 20px !important;
    border-radius: 4px !important;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.modal-content > .d-flex.justify-content-end .btn-success {
    border: 0;
    background: var(--color-primary, #146C94) !important;
    color: #fff !important;
}
.modal-content > .d-flex.justify-content-end .btn-success:hover {
    background: var(--color-primary-dark, #034b6d) !important;
}
.modal-content > .d-flex.justify-content-end button:not(.btn-success) {
    border: 1px solid #d0d5dd !important;
    background: #fff !important;
    color: #344054 !important;
}
.modal-content > .d-flex.justify-content-end button:not(.btn-success):hover {
    background: #f2f4f7 !important;
}
@media (prefers-reduced-motion: reduce) {
    .modal.fade,
    .modal.fade .modal-dialog {
        transition: none;
    }
}
/* Bootstrap-style modals (modal-header / modal-body / modal-footer): same look, same spacing */
.modal-content > .modal-header {
    align-items: flex-start;
    padding: 18px 24px 12px;
    border-bottom: 0;
}
.modal-content > .modal-body {
    padding: 4px 24px 16px;
}
.modal-content > .modal-footer {
    gap: 8px;
    padding: 14px 24px 18px;
    border-top: 1px solid #eef0f3;
}
.modal-content > .modal-footer .btn {
    height: 34px;
    padding: 0 20px;
    border-radius: 4px;
    font-size: 13px;
}

/* alert modals and SweetAlert always sit above every other popup and its fade layer */
#success-alert-modal.modal,
#warning-alert-modal.modal,
#danger-alert-modal.modal,
#info-alert-modal.modal {
    z-index: 5000 !important;
}
body:has(#success-alert-modal.show, #warning-alert-modal.show, #danger-alert-modal.show, #info-alert-modal.show) > .modal-backdrop.show:last-of-type {
    z-index: 4900 !important;
}
.swal2-container {
    z-index: 2147483000 !important;
}


/* every popup sits in the middle of the screen, both ways (the same as Bootstrap's modal-dialog-centered) */
.modal .modal-dialog:not(.modal-dialog-scrollable) {
    display: flex;
    align-items: center;
    min-height: calc(100% - 2rem);
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.modal .modal-dialog:not(.modal-dialog-scrollable) > .modal-content {
    width: 100%;
}
.modal .modal-dialog.modal-dialog-scrollable {
    align-items: center;
    max-height: calc(100% - 2rem);
}

/* icon and title side by side (SweetAlert nests both in .swal2-header); the message and the buttons sit below, from the left edge */
.swal2-popup.swal2-modal .swal2-header {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 0 !important;
}
.swal2-popup.swal2-modal .swal2-content {
    padding: 0 !important;
    margin: 0;
    text-align: left;
}

/* ======== Alert modals (success / warning / danger / info): the same popup card, in the middle of the screen ======== */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) {
    --am-accent: var(--status-info);
    --am-glyph: var(--hgi-information-circle);
    top: 0 !important;                                   /* custom.css pushed the old banner down to 30% */
}
#success-alert-modal { --am-accent: var(--status-success); --am-glyph: var(--hgi-checkmark-circle-02); }
#warning-alert-modal { --am-accent: var(--status-warning); --am-glyph: var(--hgi-alert-02); }
#danger-alert-modal  { --am-accent: var(--status-danger); --am-glyph: var(--hgi-cancel-01); }

:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .modal-dialog.modal-full-width {
    width: min(520px, calc(100% - 32px)) !important;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .modal-content {
    padding: 0 !important;
    background: #fff !important;
    color: #475467 !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .modal-content > .modal-body {
    padding: 22px 24px 18px !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text {
    width: 100%;
    left: 0;
    position: static;
}
/* icon tile + title on one row */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-title {
    display: flex;
    align-items: center;
    gap: 14px;
    float: none;
    width: 100%;
    padding: 0;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    color: #101828;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-title span {
    flex: 0 0 44px;
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 4px;
    background: color-mix(in srgb, var(--am-accent) 12%, #fff);
    color: var(--am-accent);
    font-size: 0;                                        /* hides the old icon-font glyph and the space */
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-title span::before {
    display: none !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-title span::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: var(--am-glyph) center / contain no-repeat;
    mask: var(--am-glyph) center / contain no-repeat;
}
/* message lines: dark text on the white card (the old markup forced white text) */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text p {
    margin: 0 0 4px !important;
    font-size: 14.5px;
    line-height: 1.6;
    color: #475467 !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text p:empty {
    display: none;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text .text-white,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text .text-info,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text .text-danger {
    color: #475467 !important;
}
/* buttons: right side, divider above, 34px with 4px corners */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    margin: 0 !important;
    padding: 0 20px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .continue,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn-success,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn-warning {
    border: 0;
    background: var(--color-primary, #146C94) !important;
    color: #fff !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn-light {
    border: 1px solid #d0d5dd;
    background: #fff !important;
    color: #344054 !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn-light:hover {
    background: #f2f4f7 !important;
}

/* buttons row: full width (custom.css floats it to the right, which cut the divider line short), the divider spans the whole card */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist {
    float: none !important;
    clear: both;
    width: 100%;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}
/* the main button (Continue): the project's primary colour, same border, no yellow / green ring */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.continue,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-success,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-warning {
    border: 1px solid var(--color-primary, #146C94) !important;
    background: var(--color-primary, #146C94) !important;
    color: #fff !important;
    box-shadow: none !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.continue:hover,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-success:hover,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-warning:hover {
    border-color: var(--color-primary-dark, #034b6d) !important;
    background: var(--color-primary-dark, #034b6d) !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.continue:focus-visible,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-success:focus-visible,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-warning:focus-visible,
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn.btn-light:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #146C94) 25%, transparent) !important;
}
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .btnlist .btn:focus {
    box-shadow: none;
}

/* reference line of the success / danger popups ("Error Reference 419412"): a small tag in the popup's own colour */
:is(#success-alert-modal, #info-alert-modal, #warning-alert-modal, #danger-alert-modal) .alert-box-text p[id$="-message-ref"] {
    display: inline-flex;
    align-items: center;
    margin: 8px 0 0 !important;
    padding: 4px 10px;
    border: 1px solid color-mix(in srgb, var(--am-accent) 30%, #fff);
    border-radius: 4px;
    background: color-mix(in srgb, var(--am-accent) 10%, #fff);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--am-accent) 80%, #000) !important;
}

/* ======== Success popup: "Print Note" + arrow as ONE split button, with a custom template list ======== */
#success-alert-modal .btnlist .btn-group {
    display: inline-flex;
    align-items: stretch;
    margin: 0;
}

#success-alert-modal .btnlist .btn-group > .btn {
    margin: 0 !important;
    float: none;
}

#success-alert-modal .btnlist .btn-group > .noteprint {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

#success-alert-modal .btnlist .btn-group > .dropdown-toggle-split {
    width: 34px;
    padding: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.4) !important;   /* the thin line between the two halves */
}

#success-alert-modal .btnlist .btn-group > .dropdown-toggle-split::after {
    display: none;                                                  /* no bootstrap caret, the icon is the arrow */
}

#success-alert-modal .btnlist .btn-group > .dropdown-toggle-split i {
    display: inline-flex;
    transition: transform 0.18s ease;
}

#success-alert-modal .btnlist .btn-group > .dropdown-toggle-split i::after {
    margin: 0 !important;
    transform: none !important;
}

#success-alert-modal .btnlist .btn-group > .dropdown-toggle-split.show i {
    transform: rotate(180deg);
}

/* the template list */
#success-alert-modal .pf-print-menu {
    min-width: 230px;
    margin: 0;
    padding: 4px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
}

#success-alert-modal .pf-print-menu::before {
    content: "Print using";
    display: block;
    padding: 6px 10px 4px;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #667085;
}

#success-alert-modal .pf-print-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
    color: #344054;
    white-space: nowrap;
}

#success-alert-modal .pf-print-menu .dropdown-item i {
    color: #667085;
}

#success-alert-modal .pf-print-menu .dropdown-item i::after {
    margin: 0 !important;
    transform: none !important;
}

#success-alert-modal .pf-print-menu .dropdown-item:hover,
#success-alert-modal .pf-print-menu .dropdown-item:focus {
    background: #f2f4f7;
    color: #101828;
}

#success-alert-modal .pf-print-menu .dropdown-item:active {
    background: var(--color-primary, #146C94);
    color: #ffffff;
}

#success-alert-modal .pf-print-menu .dropdown-item:active i {
    color: #ffffff;
}

/* the theme forces `.dropdown-menu-end { right: 0 !important }`, which double-shifts a menu that is already positioned
   by the dropdown engine; let the engine place this one (its right edge lines up with the end of the split button) */
#success-alert-modal .pf-print-menu.dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

/* The list opens downward when the window has room and flips upward when it does not (boundary = the window).
   The popup card must not clip it or grow a scrollbar for it, so the card lets it hang outside. */
#success-alert-modal .modal-content {
    overflow: visible;
}

/* the theme's `DropDownSlide` animation ends with `transform: none`, which wipes out the position the dropdown engine
   calculated (end-aligned, below or above the button); skip it for this menu */
#success-alert-modal .pf-print-menu,
#success-alert-modal .pf-print-menu.show {
    animation: none !important;
    transition: none;
}

/* the theme also forces `top: 100%` on dropdown menus, which is added on top of the offset the dropdown engine calculates
   (the list sat ~40px too far below the button). Anchor each placement to the edge the engine measured from. */
#success-alert-modal .pf-print-menu[data-popper-placement^="bottom"] {
    top: 0 !important;
    bottom: auto !important;
}

#success-alert-modal .pf-print-menu[data-popper-placement^="top"] {
    top: auto !important;
    bottom: 0 !important;
}
