/* confirm-modal.css
   Custom themed confirmation dialog that replaces the native browser
   confirm() popup (the ugly "localhost:8080 says..." box) everywhere
   in the app. Loaded globally via fragments/head.html so it's available
   on every page without per-page setup.

   Relies on the CSS variables defined in auth.css's :root (--primary,
   --err, --card, --border, --ink, --ink-dim), with fallbacks in case
   this file is ever loaded before auth.css. */

.confirm-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal-overlay.is-open {
    display: flex;
    animation: confirmFadeIn .15s ease both;
}

@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-modal {
    width: 100%;
    max-width: 360px;
    background: var(--card, #ffffff);
    border-radius: 20px;
    padding: 28px 26px 24px;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45);
    text-align: center;
    animation: confirmPopIn .18s ease both;
}

@keyframes confirmPopIn {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.confirm-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fdf2f1;
    color: var(--err, #d6453f);
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal-icon svg {
    width: 26px;
    height: 26px;
}

.confirm-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--ink, #1f2a37);
}

.confirm-modal-message {
    font-size: 13.5px;
    color: var(--ink-dim, #5b6b7c);
    line-height: 1.5;
    margin: 0 0 22px;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
}

.confirm-modal-actions button {
    flex: 1;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease, transform .1s ease;
}

.confirm-modal-actions button:active {
    transform: translateY(1px);
}

.confirm-modal-cancel {
    background: #eef1f5;
    color: var(--ink-dim, #5b6b7c);
}

.confirm-modal-cancel:hover {
    background: #e4e9f0;
}

.confirm-modal-confirm {
    background: var(--err, #d6453f);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(214, 69, 63, 0.5);
}

.confirm-modal-confirm:hover {
    opacity: .9;
}

.confirm-modal-confirm:focus-visible,
.confirm-modal-cancel:focus-visible {
    outline: 3px solid var(--primary, #1b5fae);
    outline-offset: 2px;
}

@media (max-width: 420px) {
    .confirm-modal {
        padding: 24px 20px 20px;
        border-radius: 16px;
    }
}