/* ── NOTIFICATIONS (#1) ─────────────────────────── */
.tasks-rail-bell-slot{display:flex;align-items:center;flex-shrink:0}
/* Messaging placeholder (#5) — greyed, non-interactive, with a "coming soon" tip. */
.tasks-rail-mail{
  position:relative;
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;min-width:42px;flex-shrink:0;
  border:1px solid var(--sidebar-control-border);
  background:var(--sidebar-control-bg);
  color:var(--sidebar-control-icon);
  border-radius:10px;
  cursor:default;opacity:.55;
}
.tasks-rail-mail:hover{opacity:.72}
.tasks-rail-mail[data-tip]:hover::after{
  content:attr(data-tip);position:absolute;top:calc(100% + 6px);left:50%;
  transform:translateX(-50%);background:#252525;border:1px solid rgba(255,255,255,.12);
  color:var(--t1);font-size:11px;padding:3px 7px;border-radius:5px;white-space:nowrap;
  pointer-events:none;z-index:999;
}
.notif-bell{
  position:relative;
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;min-width:42px;
  border:1px solid var(--sidebar-control-border);
  background:var(--sidebar-control-bg);
  color:var(--sidebar-control-icon);
  border-radius:10px;
  cursor:pointer;
  flex-shrink:0;
  transition:background .16s,color .16s,border-color .16s;
}
.notif-bell:hover{background:var(--sidebar-hover-bg);border-color:var(--sidebar-control-border);color:var(--sidebar-hover-icon)}
.notif-bell.has-unread{color:var(--t1)}
.notif-bell.active{background:var(--sidebar-active-bg);border-color:var(--sidebar-active-bg);color:var(--sidebar-active-icon);box-shadow:none}
.notif-bell-dot{
  position:absolute;top:6px;right:7px;
  width:7px;height:7px;border-radius:999px;
  background:#e43a3a;box-shadow:0 0 0 2px var(--chrome,#141414);
}
.notif-bell-badge{
  position:absolute;top:-5px;right:-5px;
  min-width:16px;height:16px;padding:0 4px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#e43a3a;color:#fff;
  font-family:var(--font);font-size:10px;font-weight:800;line-height:1;
  border-radius:999px;
  box-shadow:0 0 0 2px var(--chrome,#141414);
}
.notif-bell-badge[hidden],.notif-bell-dot[hidden]{display:none}
.notif-bell.has-unread .notif-bell-dot{display:none} /* badge supersedes the dot */

.notif-panel{
  position:fixed;z-index:1250;
  width:340px;max-width:calc(100vw - 16px);
  max-height:min(70vh,520px);
  display:none;flex-direction:column;
  background:var(--panel-bg,#181819);
  border:1px solid rgba(255,255,255,.1);
  border-radius:14px;
  box-shadow:none;
  overflow:hidden;
}
.notif-panel.open{display:flex}
.notif-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:11px 13px;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.notif-head-title{font-size:13px;font-weight:700;color:var(--t1)}
.notif-head-actions{display:flex;gap:6px}
.notif-head-btn{
  appearance:none;border:0;background:transparent;cursor:pointer;
  color:var(--t3);font-family:var(--font);font-size:11px;font-weight:600;
  padding:4px 6px;border-radius:6px;
}
.notif-head-btn:hover{color:var(--t1);background:rgba(255,255,255,.06)}
.notif-head-dismiss:hover{color:#e1aaaa;background:rgba(192,64,64,.1)}
.notif-head-btn:disabled{opacity:.4;cursor:default;background:transparent;color:var(--t3)}
.notif-list{overflow-y:auto;padding:4px 0}
/* Divider that introduces the snoozed bucket (#snooze). */
.notif-section-label{
  display:flex;align-items:center;gap:7px;
  padding:9px 14px 5px;
  font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--t3);
}
.notif-section-label::after{content:"";flex:1;height:1px;background:rgba(255,255,255,.07)}
.notif-section-count{
  flex:0 0 auto;
  min-width:16px;height:16px;padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;background:rgba(255,255,255,.07);
  font-size:10px;font-weight:700;letter-spacing:0;color:var(--t2);
}
.notif-empty{padding:26px 14px;text-align:center;color:var(--t3);font-size:12.5px}
.notif-item{
  display:flex;align-items:flex-start;gap:9px;
  padding:10px 13px;
  cursor:pointer;
  transition:background .12s ease;
}
.notif-item:hover{background:rgba(255,255,255,.045)}
.notif-item.unread{background:rgba(102,144,242,.05)}
.notif-item-dot{
  flex-shrink:0;margin-top:5px;
  width:7px;height:7px;border-radius:999px;
  background:transparent;
}
.notif-item.unread .notif-item-dot{background:#e43a3a}
.notif-item-body{flex:1;min-width:0}
.notif-item-title{
  font-size:12.5px;font-weight:600;color:var(--t1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.notif-item.unread .notif-item-title{font-weight:700}
.notif-item-meta{font-size:11px;color:var(--t3);margin-top:2px}
/* Actions reveal on hover (#3) — kept in layout (opacity, not display) so the
   row never reflows when they appear. */
.notif-item-acts{
  display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0;
  opacity:0;pointer-events:none;transition:opacity .12s ease;
}
.notif-item:hover .notif-item-acts,
.notif-item:focus-within .notif-item-acts{opacity:1;pointer-events:auto}
.notif-item-btn{
  appearance:none;cursor:pointer;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.04);
  color:var(--t2);
  font-family:var(--font);font-size:10.5px;font-weight:600;
  padding:3px 8px;border-radius:7px;
  display:inline-flex;align-items:center;justify-content:center;gap:3px;
  white-space:nowrap;
}
.notif-item-btn:hover{background:rgba(255,255,255,.09);color:var(--t1)}
.notif-item-btn b{font-weight:800;color:var(--t1)}
/* Quick-snooze split button: main action + caret to open the duration menu. */
.notif-snooze-split{display:flex}
.notif-snooze-main{border-top-right-radius:0;border-bottom-right-radius:0}
.notif-snooze-caret{
  border-top-left-radius:0;border-bottom-left-radius:0;border-left:0;
  padding:3px 5px;
}
.notif-snooze-caret svg{display:block}
.notif-item-dismiss:hover{
  background:rgba(228,58,58,.14);border-color:rgba(228,58,58,.3);color:#e98c8c;
}

/* Bell "ringing" pulse + the toast that drops under it while an alarm plays (#7) */
.notif-bell.ringing{color:#e98c8c;animation:notifBellShake 1s ease-in-out infinite}
@keyframes notifBellShake{0%,100%{transform:rotate(0)}10%,30%{transform:rotate(-9deg)}20%,40%{transform:rotate(9deg)}50%{transform:rotate(0)}}
.notif-ring-toast,.notif-ping-toast{
  position:fixed;z-index:1320;
  display:flex;align-items:center;gap:10px;
  width:280px;max-width:calc(100vw - 16px);
  padding:11px 12px;
  background:var(--panel-bg,#1c1c1c);
  border:1px solid color-mix(in srgb,var(--acc,#6f97f6) 30%,rgba(255,255,255,.12));
  border-radius:13px;
  box-shadow:none;
  cursor:pointer;
  opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease;
}
.notif-ring-toast.show,.notif-ping-toast.show{opacity:1;transform:none}
.notif-ping-toast{border-color:color-mix(in srgb,#55c279 30%,rgba(255,255,255,.12));}
.notif-ring-ico{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:9px;
  background:color-mix(in srgb,var(--acc,#6f97f6) 18%,transparent);color:var(--acc,#6f97f6);
}
.notif-ring-ico svg{width:16px;height:16px}
.notif-ring-body{flex:1;min-width:0;display:flex;flex-direction:column}
.notif-ring-title{font-size:12.5px;font-weight:700;color:var(--t1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notif-ring-sub{font-size:11px;color:var(--t3);margin-top:1px}
.notif-ring-stop{
  flex-shrink:0;appearance:none;cursor:pointer;
  width:24px;height:24px;border-radius:8px;
  border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);
  color:var(--t2);font-size:16px;line-height:1;
  display:inline-flex;align-items:center;justify-content:center;
}
.notif-ring-stop:hover{background:rgba(228,58,58,.16);border-color:rgba(228,58,58,.3);color:#e98c8c}

.notif-item-open{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px}
.notif-item-open svg{display:block}

.notif-item.snoozed{opacity:.72}
.notif-item.snoozed:hover{opacity:1}
.notif-item.snoozed .notif-item-dot{background:transparent;box-shadow:inset 0 0 0 1.5px var(--t3)}
.notif-item.snoozed .notif-item-title{font-weight:600;color:var(--t2)}
.notif-item.snoozed .notif-item-meta{color:var(--t3)}

/* Snooze duration chooser (#snooze) — opens from the Snooze button. */
.notif-snooze-menu{
  position:fixed;z-index:1300;
  min-width:168px;padding:5px;
  background:var(--panel-bg,#181819);
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  box-shadow:none;
  animation:notifPopIn .12s ease;
}
@keyframes notifPopIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.notif-snooze-menu-head{
  padding:5px 9px 6px;
  font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--t3);
}
.notif-snooze-menu-item{
  display:block;width:100%;text-align:left;
  appearance:none;border:0;cursor:pointer;
  background:transparent;color:var(--t1);
  font-family:var(--font);font-size:12.5px;font-weight:550;
  padding:8px 9px;border-radius:8px;
}
.notif-snooze-menu-item:hover{background:rgba(255,255,255,.07)}

/* ── Bell in the mobile top app bar (phones) ──────────────────────────────────
   The m-topbar action button itself acts as the bell: a plain icon (no chip box)
   with the badge/dot anchored onto it. */
.m-topbar-action.m-topbar-bell{position:relative}
.m-topbar-bell.has-unread{color:var(--t1)}
.m-topbar-bell.active{background:rgba(255,255,255,.08)}
.m-topbar-bell .notif-bell-dot{top:9px;right:11px}
.m-topbar-bell .notif-bell-badge{top:4px;right:4px}
@media(max-width:540px){
  /* Notification panel becomes a clean full-width sheet under the top bar. */
  .notif-panel.open{
    left:8px!important;right:8px!important;width:auto!important;max-width:none!important;
    top:calc(var(--m-topbar-h) + var(--safe-t) + 8px)!important;
    max-height:min(72vh,560px);
  }
}
