/* Soft notification cards inside the shared floating inbox. */
.notification-dropdown { --notification-avatar-size:32px; --notification-body-size:14px; }
html[data-theme] .notification-dropdown { width:480px; max-height:calc(100dvh - 100px); padding:var(--page-surface-roomy-inset); overflow:hidden; }
html[data-theme] .notification-menu[open] > .notification-dropdown:not([hidden]) { display:flex; flex-direction:column; }
html[data-theme] .notification-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 0 var(--surface-gap); border:0; flex:0 0 auto; background:transparent; }
html[data-theme] .notification-heading > .notification-title { display:flex; align-items:center; gap:7px; min-width:0; }
html[data-theme] body.panel-typography .notification-title > strong { font-family:var(--panel-heading-font); font-size:var(--panel-subsection-title-size); font-weight:500; color:var(--ink); }
.notification-title .notification-total { margin:0; font-size:10px; }
html[data-theme] .notification-heading > .notification-header-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
html[data-theme] body.panel-typography .notification-dropdown .notification-header-actions > .text-button { min-height:40px; font-size:var(--panel-caption-size); padding:0 var(--surface-gap); border-radius:999px; corner-shape:round; background:var(--surface-subtle); white-space:nowrap; }
html[data-theme] .notification-header-actions > .notification-close { display:none!important; align-items:center; justify-content:center; width:36px; height:36px; min-width:36px; min-height:36px; padding:0; border:1px solid var(--line); border-radius:50%; background:transparent; color:var(--muted); }
.notification-header-actions .notification-close:hover:where(:not(html[data-hover-disabled] *)) { border-color:var(--muted); color:var(--ink); }
.notification-close > .icon { width:18px; height:18px; }
html[data-theme] .notification-dropdown .notification-list { min-height:0; flex:1 1 auto; overflow:auto; max-height:min(560px,65dvh); display:grid; gap:var(--compact-gap); padding:0; overscroll-behavior:contain; }
html[data-theme] .notification-dropdown .notification-item { align-items:flex-start; gap:var(--identity-gap); padding:var(--surface-gap) var(--compact-gap); background:transparent; border-radius:var(--inset-corner); corner-shape:var(--surface-curve); line-height:1.4; }
html[data-theme] .notification-item:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible) { background:var(--surface-subtle); }
.notification-actor,.notification-event-icon { box-sizing:border-box; display:flex; align-items:center; justify-content:center; flex:0 0 32px; width:32px; min-width:32px; height:32px; margin-top:1px; }
.notification-event-icon { border-radius:50%; background:var(--surface-subtle); color:var(--muted); }
.notification-event-icon > .icon { width:19px; height:19px; }
.notification-event-icon.is-danger { color:var(--danger); }
.notification-item-content { gap:4px; }
.notification-item-top { align-items:baseline; flex-wrap:nowrap; gap:8px; }
.notification-item-top > strong { font-size:14px; font-weight:500; line-height:1.4; }
.notification-item.is-unread .notification-item-top > strong { font-weight:600; }
.notification-item-meta { display:flex; align-items:center; justify-content:flex-end; gap:5px; flex-shrink:0; }
.notification-item-meta time { font-size:10px; color:var(--muted); white-space:nowrap; }
.notification-item-meta .notification-unread-dot { margin:0; width:4px; height:4px; background:var(--control-accent); }
.notification-item-content > .notification-context { color:var(--muted); font-size:11px; line-height:1.4; }
.notification-slot { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 7px; font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; }
.notification-slot strong { color:var(--ink); font-size:13px; font-weight:500; white-space:nowrap; }
.notification-change { display:grid; gap:4px; font-size:12px; color:var(--muted); line-height:1.5; font-variant-numeric:tabular-nums; }
.notification-change strong { font-size:12px; font-weight:500; color:var(--ink); }
.notification-change-arrow { color:var(--muted); }
html[data-theme] .notification-description { font-size:13px; line-height:1.5; color:var(--muted); }
.notification-empty { padding:26px 18px; }
.notification-empty > p { max-width:260px; line-height:1.5; }
@media(max-width:650px) {
 html[data-theme] .notification-header-actions > .notification-close { display:flex!important; }
 /* Keep the heading outside the scrollable list, like the desktop inbox.
    The sheet handle and its top inset remain in the fixed part. */
 html[data-theme] body .mobile-sheet.notification-dropdown:popover-open { display:flex; flex-direction:column; overflow:hidden!important; }
 html[data-theme] .notification-heading { position:static; top:auto; z-index:auto; padding:0 0 var(--surface-gap); }
 html[data-theme] body .mobile-sheet.notification-dropdown .notification-list { min-height:0; max-height:none; overflow:auto; padding:0; }
 html[data-theme] .notification-dropdown .notification-item { padding:var(--surface-gap) var(--compact-gap); }
 .notification-title > strong { font-size:var(--page-section-heading-size); font-weight:var(--panel-heading-weight); line-height:1.25; }
 html[data-theme] .notification-heading > .notification-header-actions { gap:8px; }
 html[data-theme] body.panel-typography .notification-dropdown .notification-header-actions > .text-button { padding-inline:var(--compact-gap); }
}

html[data-theme] .notification-item + .notification-item { border-top:0; }
.notification-event-icon.is-new { color:var(--action,var(--ink)); }
.notification-event-icon.is-change { color:var(--accent,var(--muted)); }
.notification-item-top > .notification-unread-dot { margin:0; align-self:center; width:5px; height:5px; background:var(--control-accent); }
.notification-item-content > .notification-created { margin-top:2px; font-size:11px; color:var(--muted); line-height:1.5; }
.notification-change-date { font-size:12px; color:var(--muted); }
.notification-change-times { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.notification-change-times > span:not(.notification-change-arrow) { display:inline-flex; align-items:baseline; gap:4px; }
.notification-change-label { color:var(--muted); font-size:11px; }

/* People lead real events; the avatar stays small beside the action. */
.notification-actor > .avatar { display:block; width:32px; height:32px; border-radius:50%; }
.notification-message { min-width:0; font-size:13px; font-weight:400; line-height:1.5; color:var(--ink); overflow-wrap:anywhere; }
.notification-message > strong { font-weight:550; }
.notification-item.is-unread .notification-message > strong { font-weight:600; }
.notification-item-top { align-items:flex-start; }
.notification-item-top > .notification-unread-dot { flex:0 0 5px; align-self:auto; margin-top:7px; }
.notification-item-content { min-width:0; flex:1; }
.notification-change { padding:8px 10px; border-radius:10px; background:var(--surface-subtle); margin-top:3px; }

.notification-backdrop { display:none; }
@media(min-width:651px) {
 .topbar:has(.notification-menu[open]) { z-index:80; }
 .notification-menu[open]>.notification-backdrop { display:block; position:fixed; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; border-radius:0!important; background:rgb(0 0 0 / .38); z-index:39; cursor:default; }
 html[data-theme='dark'] .notification-menu[open]>.notification-backdrop { background:rgb(0 0 0 / .55); }
 .notification-menu[open]>.notification-trigger { z-index:41; }
}
html[data-theme] .notification-dropdown .notification-event-icon { width:var(--notification-avatar-size); height:var(--notification-avatar-size); min-width:var(--notification-avatar-size); flex-basis:var(--notification-avatar-size); background:var(--surface); }
html[data-theme] .notification-dropdown .notification-actor { width:var(--notification-avatar-size); height:var(--notification-avatar-size); min-width:var(--notification-avatar-size); flex-basis:var(--notification-avatar-size); }
.notification-dropdown .notification-actor>.avatar { width:var(--notification-avatar-size); height:var(--notification-avatar-size); }
.notification-dropdown .notification-unread-dot { background:var(--control-accent); }

html[data-theme] .notification-dropdown .notification-item.is-unread { background:var(--surface-subtle); }
.notification-dropdown .notification-item-content { gap:var(--compact-gap); }
.notification-dropdown .notification-item-top { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px var(--compact-gap); }
.notification-dropdown .notification-author-name { min-width:0; font-size:var(--notification-body-size); font-weight:550; overflow-wrap:anywhere; }
.notification-dropdown .notification-message { display:block; width:100%; font-size:var(--notification-body-size); line-height:1.5; }
.notification-dropdown .notification-received { flex:0 0 auto; font-size:var(--panel-caption-size); color:var(--muted); font-weight:400; white-space:nowrap; }
.notification-dropdown .notification-item-top>.notification-unread-dot { position:absolute; right:var(--surface-gap); top:var(--surface-gap); margin:0; width:6px; height:6px; }
.notification-dropdown .notification-item.is-unread .notification-item-top { padding-right:var(--surface-gap); }
html[data-theme] .notification-dropdown .notification-description { font-size:var(--notification-body-size); }

/* The sender and action form one sentence; the timestamp closes the entry. */
.notification-dropdown .notification-item-content { align-items:stretch; }
.notification-dropdown .notification-received { align-self:flex-start; }
.notification-dropdown .notification-shift-transfer {
 display:flex; align-items:baseline; flex-wrap:wrap; gap:0 var(--compact-gap);
 margin:0; padding:0; background:transparent;
}
.notification-dropdown .notification-shift-transfer .notification-change-date { order:1; }
.notification-dropdown .notification-shift-version { display:inline-flex; gap:var(--compact-gap); }
.notification-dropdown .notification-shift-version.is-current { order:0; }
.notification-dropdown .notification-shift-version.is-current>span { position:absolute; clip-path:inset(50%); }
.notification-dropdown .notification-shift-version.is-current>strong { font-size:var(--panel-subsection-title-size); }
.notification-dropdown .notification-shift-version:not(.is-current) { order:2; flex-basis:100%; }

/* Absence inbox entries show a summary; the shared details dialog owns the full reason. */
html[data-theme] .notification-dropdown .notification-item.is-absence-notice { background:var(--surface-subtle); padding:var(--surface-gap); }
.notification-absence-summary { display:grid; gap:calc(var(--compact-gap) / 2); min-width:0; font-size:var(--panel-caption-size); line-height:1.5; color:var(--muted); }
.notification-absence-summary>strong { font-size:var(--notification-body-size); font-weight:550; color:var(--ink); }
.notification-details-link { display:flex; align-items:center; gap:var(--compact-gap); color:var(--action); font-size:var(--panel-caption-size); line-height:1.5; }
.notification-details-link>.icon { width:16px; height:16px; flex:0 0 16px; }

.notification-shift-transfer { padding:var(--compact-gap); background:var(--surface-subtle); border-radius:var(--small-control-corner); }
.notification-shift-version { display:grid; grid-template-columns:48px minmax(0,1fr); gap:var(--compact-gap); align-items:baseline; }
.notification-shift-version>span { color:var(--muted); }
.notification-shift-version del { text-decoration:none; color:var(--muted); overflow-wrap:anywhere; }
.notification-shift-version.is-current strong { color:var(--ink); overflow-wrap:anywhere; }
