/* ═══════════════════════════════════════════════════════════════════
   TOASTS AND CONFIRMATION POP-UPS (templates/layout/_toasts.html.twig,
   assets/notify.js). Loaded on every page by base.html.twig.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Toasts: top centre, newest at the bottom of the stack ────────── */
.toasts {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    left: 50%;
    z-index: 10002; /* above the nav, cookie banner and card pack */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: min(460px, calc(100% - 2rem));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    --toast-colour: var(--accent);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 0.9rem 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--toast-colour);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    color: var(--text);
    font-family: 'Outfit', system-ui, sans-serif;
    pointer-events: auto;
    animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast--success { --toast-colour: var(--success); }
.toast--info    { --toast-colour: var(--accent); }
.toast--error   { --toast-colour: var(--danger); }

.toast__icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--toast-colour);
    color: var(--surface);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35rem;
    text-align: center;
}

.toast--success .toast__icon::before { content: '✓'; }
.toast--info    .toast__icon::before { content: 'i'; font-family: Georgia, serif; font-style: italic; }
.toast--error   .toast__icon::before { content: '!'; }

.toast__message {
    flex: 1;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.toast__close {
    flex-shrink: 0;
    margin: -0.2rem -0.1rem 0 0;
    padding: 0.1rem 0.35rem;
    background: none;
    border: 0;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.toast__close:hover { color: var(--text); }
.toast__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.toast--leaving { animation: toast-out 0.25s ease-in both; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .toast, .toast--leaving { animation-duration: 0.01s; }
}

/* ── SweetAlert2 pop-ups in the app's look ────────────────────────── */
.swal2-container.swal2-backdrop-show { background: rgba(7, 8, 13, 0.55); }

.swal-popup.swal2-popup {
    width: min(420px, calc(100% - 2rem));
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-family: 'Outfit', system-ui, sans-serif;
}

.swal-title.swal2-title {
    padding: 0 0 0.5rem;
    color: var(--text);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
}

.swal-text.swal2-html-container {
    margin: 0;
    padding: 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.55;
}

.swal-actions.swal2-actions {
    gap: 0.6rem;
    margin: 1.5rem 0 0;
    width: 100%;
    justify-content: flex-end;
}

.swal-actions .button { margin: 0; }
