/* Notification toasts + dismiss buttons + Clear-all action.
   Loaded everywhere notifications.js runs (base.html). */

/* ── Toast host ────────────────────────────────────────────── */
.notif-toast-host {
    position: fixed;
    top: 76px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 36px);
}

@media (max-width: 600px) {
    .notif-toast-host {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}

/* ── Individual toast ──────────────────────────────────────── */
.notif-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45), 0 2px 6px rgba(2, 6, 23, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 240ms cubic-bezier(.22,.61,.36,1), opacity 240ms ease;
    cursor: pointer;
}
.notif-toast.is-in {
    transform: translateX(0);
    opacity: 1;
}
.notif-toast.is-out {
    transform: translateX(110%);
    opacity: 0;
}

.notif-toast-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-toast-body {
    flex: 1;
    min-width: 0;
}
.notif-toast-title {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.3;
}
.notif-toast-msg {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: #cbd5e1;
    word-break: break-word;
}

.notif-toast-close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 4px;
}
.notif-toast-close:hover {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.15);
}

/* Doc-event accent colors */
.notif-toast[data-id] .notif-toast-icon { background: rgba(34, 197, 94, 0.18); color: #86efac; }

/* ── Panel header actions (Mark all read + Clear all) ──────── */
.app-notif-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-notif-clear-all {
    background: transparent;
    border: none;
    color: #f87171;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 120ms ease;
}
.app-notif-clear-all:hover {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

/* ── Per-item dismiss button ───────────────────────────────── */
.app-notif-item {
    position: relative;
}
.app-notif-item-dismiss {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.app-notif-item:hover .app-notif-item-dismiss,
.app-notif-item:focus-within .app-notif-item-dismiss {
    opacity: 1;
}
.app-notif-item-dismiss:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #f8fafc;
}

/* ── Light theme overrides ─────────────────────────────────── */
body.light-mode .notif-toast,
.light-mode .notif-toast,
body[data-theme="light"] .notif-toast {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
}
body.light-mode .notif-toast-title,
.light-mode .notif-toast-title { color: #0f172a; }
body.light-mode .notif-toast-msg,
.light-mode .notif-toast-msg { color: #475569; }
body.light-mode .notif-toast-close,
.light-mode .notif-toast-close { color: #64748b; }
body.light-mode .notif-toast-close:hover,
.light-mode .notif-toast-close:hover { color: #0f172a; background: rgba(15, 23, 42, 0.06); }

body.light-mode .app-notif-item-dismiss,
.light-mode .app-notif-item-dismiss { color: #64748b; }
body.light-mode .app-notif-item-dismiss:hover,
.light-mode .app-notif-item-dismiss:hover { color: #0f172a; background: rgba(15, 23, 42, 0.06); }
