/* Scoped flash dialog styles; Bootstrap JS remains responsible for opening and closing. */
body.modal-open { overflow: hidden; }
#flashModal, #flashModal * { box-sizing: border-box; }
#flashModal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}
#flashModal.fade { opacity: 0; transition: opacity .15s linear; }
#flashModal.show { opacity: 1; }
#flashModal .modal-dialog {
    position: relative;
    display: flex;
    align-items: center;
    width: auto;
    max-width: 500px;
    min-height: calc(100% - 32px);
    margin: 16px auto;
    padding: 0 12px;
    pointer-events: none;
    transform: translateY(-24px);
    transition: transform .3s ease-out;
}
#flashModal.show .modal-dialog { transform: none; }
#flashModal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    outline: 0;
}
#flashModal .modal-header, #flashModal .modal-footer {
    display: flex;
    align-items: center;
    padding: 16px;
}
#flashModal .modal-header { justify-content: space-between; border-bottom: 1px solid #dee2e6; }
#flashModal .modal-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.5; }
#flashModal .modal-body { position: relative; flex: 1 1 auto; padding: 20px 16px; overflow-wrap: anywhere; }
#flashModal .modal-footer { justify-content: flex-end; border-top: 1px solid #dee2e6; }
#flashModal .btn-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #555;
    cursor: pointer;
}
#flashModal .btn-close::before { content: '\00d7'; font-size: 28px; line-height: 1; }
#flashModal .btn-primary {
    padding: 8px 18px;
    border: 1px solid #075394;
    border-radius: 4px;
    background: #075394;
    color: #fff;
    font: inherit;
    cursor: pointer;
}
#flashModal .btn-primary:hover { background: #063e70; }
#flashModal button:focus-visible { outline: 3px solid #78bafa; outline-offset: 2px; }
body > .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    width: 100vw;
    height: 100vh;
    background: #000;
}
body > .modal-backdrop.fade { opacity: 0; transition: opacity .15s linear; }
body > .modal-backdrop.show { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
    #flashModal.fade, #flashModal .modal-dialog, body > .modal-backdrop.fade { transition: none; }
}