/* Minimal Bootstrap-5-compatible modal chrome, hand-trimmed (no reboot) so it can't clash with
   the legacy framework.css/content.css/mobile.css/modal.css already pixel-matched against the
   real site. Class names match real Bootstrap 5 (.modal/.modal-dialog/.modal-content/...) so this
   file is a drop-in no-op if bootstrap.min.css is ever added site-wide later. */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.fade .modal-dialog {
    transition: transform .3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-dialog.pp-modal-lg {
    max-width: 800px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: .3rem;
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .3);
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.modal-header .btn-close {
    padding: .25rem;
    margin: -.25rem -.25rem -.25rem auto;
    background: transparent;
    border: 0;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    min-height: 3em;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: .75rem;
    border-top: 1px solid #dee2e6;
    gap: .5rem;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: .5;
}

@media (min-width: 576px) {
    .modal-dialog {
        margin: 1.75rem auto;
    }
}

.pp-modal-spinner {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .85);
    z-index: 1;
}

.pp-modal-loading .pp-modal-spinner {
    display: flex;
}

.pp-modal-spinner::after {
    content: "";
    width: 2rem;
    height: 2rem;
    border: 3px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: pp-modal-spin .7s linear infinite;
}

@keyframes pp-modal-spin {
    to {
        transform: rotate(360deg);
    }
}

.pp-modal-error {
    color: #a00;
    font-weight: bold;
}
