/* =====================================================================
   "Leave without saving?" question and the popup nudge (popups.js).
   Loaded on the public site and in the admin panel; colours fall back
   to plain values where a page doesn't define the variables.
   ===================================================================== */
.sy-confirm {
    position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem;
    background: rgba(10, 20, 35, .6); backdrop-filter: blur(2px);
    animation: sy-fade .15s ease-out;
}
.sy-confirm[hidden] { display: none; }
.sy-confirm-box {
    width: min(400px, 100%); background: var(--surface, var(--panel, #fff)); color: var(--ink, #16283a);
    border-radius: 18px; padding: 1.6rem 1.4rem 1.2rem; text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3); animation: sy-pop .2s cubic-bezier(.2, .9, .3, 1.2);
}
.sy-confirm-ico { font-size: 2.2rem; line-height: 1; margin-bottom: .5rem; }
.sy-confirm-box h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .4rem; }
.sy-confirm-box p { color: var(--ink-soft, #51667c); margin: 0 0 1.2rem; line-height: 1.5; }
.sy-confirm-actions { display: flex; gap: .6rem; }
.sy-confirm-btn {
    flex: 1 1 0; min-height: 48px; padding: .7rem 1rem; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer;
    border: 1.5px solid var(--line, #dfeaf4); background: var(--bg-alt, var(--bg, #f5f9fd)); color: var(--ink, #16283a);
}
.sy-confirm-btn:hover { border-color: var(--brand, #2e77c0); color: var(--brand, #2e77c0); }
.sy-confirm-btn.danger { background: var(--danger, #dc2626); border-color: var(--danger, #dc2626); color: #fff; }
.sy-confirm-btn.danger:hover { filter: brightness(1.08); color: #fff; }
.sy-confirm-btn:focus-visible { outline: 3px solid var(--brand, #2e77c0); outline-offset: 2px; }
@media (max-width: 420px) { .sy-confirm-actions { flex-direction: column-reverse; } }

/* The background was clicked: shake the popup a little */
.sy-nudge { animation: sy-nudge .4s ease-in-out; }

@keyframes sy-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sy-pop { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sy-nudge {
    0%, 100% { transform: none; }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
    .sy-confirm, .sy-confirm-box, .sy-nudge { animation: none; }
}
