/* The site-wide confirmation modal (public/js/confirm.js). */
.sai-confirm {
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: #09214a;
    overflow: visible;
    animation: sai-confirm-in 220ms cubic-bezier(.2, .9, .3, 1.15) both;
}

.sai-confirm::backdrop {
    background: rgba(9, 23, 48, .42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: sai-confirm-fade 200ms ease-out both;
}

.sai-confirm.is-closing {
    animation: sai-confirm-out 160ms ease-in both;
}

.sai-confirm.is-closing::backdrop {
    animation: sai-confirm-fade 160ms ease-in reverse both;
}

.sai-confirm-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px 18px;
    padding: 26px 26px 22px;
    border: 1px solid rgba(211, 222, 238, .9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(9, 33, 74, .28), 0 4px 14px rgba(9, 33, 74, .1);
    font-family: 'DM Sans', system-ui, sans-serif;
}

.sai-confirm-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #e8f1ff;
    color: #0b5fd1;
}

.sai-confirm[data-tone="danger"] .sai-confirm-icon {
    background: #fdecea;
    color: #b42318;
}

.sai-confirm-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sai-confirm-copy {
    display: grid;
    gap: 6px;
    align-content: center;
    min-width: 0;
}

.sai-confirm-copy h2 {
    margin: 0;
    font: 800 18px/1.35 Manrope, sans-serif;
    color: #09214a;
    overflow-wrap: anywhere;
}

.sai-confirm-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #4f6585;
}

.sai-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.sai-confirm-actions button {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font: 700 15px 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.sai-confirm-actions button:active {
    transform: scale(.97);
}

.sai-confirm-actions button:focus-visible {
    outline: 3px solid #8fbaff;
    outline-offset: 2px;
}

.sai-confirm-cancel {
    border: 1px solid #c4d2e8;
    background: #ffffff;
    color: #09214a;
}

.sai-confirm-cancel:hover {
    background: #f3f6fb;
}

.sai-confirm-ok {
    border: 1px solid #087cff;
    background: #087cff;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(8, 124, 255, .28);
}

.sai-confirm-ok:hover {
    background: #0a6ee0;
}

.sai-confirm[data-tone="danger"] .sai-confirm-ok {
    border-color: #c0352b;
    background: #c0352b;
    box-shadow: 0 8px 20px rgba(192, 53, 43, .26);
}

.sai-confirm[data-tone="danger"] .sai-confirm-ok:hover {
    background: #a52a21;
}

.sai-confirm-ok:disabled {
    opacity: .7;
    cursor: progress;
}

@media (max-width: 480px) {
    .sai-confirm {
        margin: auto auto 16px;
    }

    .sai-confirm-panel {
        grid-template-columns: 1fr;
        padding: 22px 20px 18px;
    }

    .sai-confirm-actions {
        flex-direction: column-reverse;
    }

    .sai-confirm-actions button {
        width: 100%;
    }
}

@keyframes sai-confirm-in {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes sai-confirm-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(8px) scale(.97); }
}

@keyframes sai-confirm-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .sai-confirm,
    .sai-confirm::backdrop,
    .sai-confirm.is-closing,
    .sai-confirm.is-closing::backdrop {
        animation: none;
    }

    .sai-confirm-actions button {
        transition: none;
    }
}
