/* Notifications, deadline alerts and multi-step assignments (2026-10-22). */

/* ---- the bell and its panel ---- */
.hd-bell { position: relative; }
.alert-panel { position: fixed; top: 64px; right: 16px; z-index: 950; width: min(420px, calc(100vw - 24px)); max-height: min(72vh, 640px);
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 22px 50px -20px rgba(38,33,59,.45); overflow: hidden; animation: al-in .18s ease-out; }
@keyframes al-in { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.alert-panel-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.alert-dl { display: grid; gap: 6px; padding: 10px 12px; background: var(--gold-soft); border-bottom: 1px solid var(--line-soft); }
.alert-dl-row { display: flex; gap: 10px; align-items: flex-start; color: inherit; text-decoration: none; padding: 6px 8px; border-radius: 10px; background: #fff; }
.alert-dl-row.late { background: var(--bad-soft); }
.alert-dl-row span:last-child { display: grid; }
.alert-dl-row small { color: var(--ink-soft); font-size: .76rem; }
.alert-list { overflow-y: auto; flex: 1; }
.alert-row { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.alert-row:hover { background: #faf8ff; }
.alert-row.unread { background: var(--accent-soft); }
.alert-row.unread b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.alert-i { font-size: 1.15rem; line-height: 1.3; }
.alert-t { display: grid; gap: 2px; min-width: 0; }
.alert-t span { font-size: .84rem; color: var(--ink-soft); }
.alert-t small { font-size: .72rem; color: var(--ink-faint); }
.alert-panel-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: .8rem; }

/* ---- the deadline banner on student screens ---- */
.deadline-banner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; margin: 0 0 12px; border-radius: 14px;
  background: var(--gold-soft); border: 1.5px solid #ecd28a; color: var(--gold-ink); }
.deadline-banner[hidden] { display: none; }
.deadline-banner.late { background: var(--bad-soft); border-color: #efb1b1; color: #7a1f1f; }
.db-i { font-size: 1.4rem; }
.db-t { flex: 1; min-width: 0; display: grid; }
.db-t span { font-size: .84rem; }
.db-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; color: inherit; opacity: .6; cursor: pointer; padding: 4px; }

/* ---- the assign form: one task or several steps ---- */
.as-mode { display: flex; gap: 6px; margin: -2px 0 14px; }
.as-mode button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px; font: inherit; font-weight: 700;
  color: var(--ink-soft); cursor: pointer; }
.as-mode button.on { background: var(--accent-soft); border-color: var(--lilac-deep); color: var(--accent-ink); }
.as-multi { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: #fcfbff; }
.as-is-multi [data-single-only] { display: none !important; }
.as-steps-h { font-weight: 800; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); margin: 6px 0; }
.as-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.as-step { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.as-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.as-step-t { flex: 1; min-width: 0; font-size: .88rem; }
.as-step-b { display: flex; gap: 4px; }
.as-empty { padding: 8px 2px; }

/* ---- the assignment list ---- */
.asg-row { padding: 9px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: flex-start; }
.asg-row[data-open-id] { cursor: pointer; }
.asg-row[data-open-id]:hover { background: #faf8ff; }
.asg-main { flex: 1; min-width: 0; }
.asg-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.asg-bundle { border: 1.5px solid var(--lilac); border-radius: 14px; padding: 12px 14px; margin: 10px 0; background: linear-gradient(180deg, #fbf8ff, #fff 60%); }
.asg-bundle.complete { border-color: #bfe3cd; background: linear-gradient(180deg, #f2fbf5, #fff 60%); }
.asg-bundle-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.asg-note { font-size: .86rem; margin-top: 4px; }
.asg-bar { height: 6px; border-radius: 999px; background: var(--line-soft); margin: 10px 0 4px; overflow: hidden; }
.asg-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #c084fc); }
.asg-bundle.complete .asg-bar span { background: linear-gradient(90deg, #1f8a4c, #6cc58d); }
.asg-step { padding: 9px 4px; border-radius: 10px; border-bottom: 0; }
.asg-step + .asg-step { border-top: 1px dashed var(--line); }
.asg-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-ink); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .82rem; margin-top: 2px; }
.asg-step.done .asg-n { background: var(--ok); }
.asg-step.locked { opacity: .62; }
.asg-step.locked .asg-n { background: var(--line); color: var(--ink-soft); }
.asg-lock { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.asg-crumb { font-size: .8rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 4px; }
.asg-locked-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--line-soft); font-size: 1rem; }
.asg-ex { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: 14px;
  border: 1.5px solid var(--lilac); background: linear-gradient(135deg, #f6f1ff, #fff); }
.asg-ex.done { border-color: #bfe3cd; background: linear-gradient(135deg, #f2fbf5, #fff); }

@media (max-width: 760px) {
  .alert-panel { top: 108px; right: 12px; }
  .deadline-banner { flex-wrap: wrap; }
  .deadline-banner .btn { margin-left: auto; }
  .asg-bundle-h { flex-direction: column; }
  .as-step { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .alert-panel { animation: none; } }
