/* Instructor notification: card bottom-right (full width on phones), minimizable to a pill. Shared with the instructor preview. */
.ws-note, .ws-note-pill {
  --note-bg: #ffffff;
  --note-text: #1d2318;
  --note-muted: #6b7080;
  --note-border: #e3e6ea;
  --note-hover: rgba(0, 0, 0, .06);
  --note-shadow: 0 18px 50px rgba(15, 20, 10, .22), 0 2px 6px rgba(15, 20, 10, .08);
  --tone: #2f6fb3;
  --tone-soft: #e8f1fb;
  font: inherit;
  color: var(--note-text);
}
.ws-note--warning { --tone: #b35a1f; --tone-soft: #fcefe3; }
.ws-note--success { --tone: #1a7f4e; --tone-soft: #e3f5ec; }

html[data-theme="dark"] .ws-note, html[data-theme="dark"] .ws-note-pill {
  --note-bg: #1f232b;
  --note-text: #eceef2;
  --note-muted: #a2a8b4;
  --note-border: #343a46;
  --note-hover: rgba(255, 255, 255, .08);
  --note-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04);
  --tone: #7fb3ea;
  --tone-soft: rgba(127, 179, 234, .14);
}
html[data-theme="dark"] .ws-note--warning { --tone: #f0a35e; --tone-soft: rgba(240, 163, 94, .14); }
html[data-theme="dark"] .ws-note--success { --tone: #5fcf98; --tone-soft: rgba(95, 207, 152, .14); }

.ws-note {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 40px));
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: 16px 12px 18px 16px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-top: 4px solid var(--tone);
  border-radius: 14px;
  box-shadow: var(--note-shadow);
  text-align: left;
  animation: wsNoteIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
.ws-note.ws-note--static { position: static; width: 100%; max-width: 440px; animation: none; box-shadow: 0 6px 20px rgba(15, 20, 10, .12); }
.ws-note.is-new { animation: wsNoteIn .28s cubic-bezier(.2, .9, .3, 1.2), wsNoteGlow 1.6s ease-out .3s 2; }

.ws-note__icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tone-soft); color: var(--tone);
}
.ws-note__icon svg { width: 20px; height: 20px; }
.ws-note__main { min-width: 0; }
.ws-note__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 1px 0 4px; }
.ws-note__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.ws-note__time { font-size: .78rem; color: var(--note-muted); font-variant-numeric: tabular-nums; }
.ws-note__text {
  font-size: 1.04rem; line-height: 1.5; font-weight: 500;
  white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 40vh; overflow-y: auto;
}
.ws-note__text.is-placeholder { color: var(--note-muted); font-style: italic; font-weight: 400; }
.ws-note__actions { display: flex; gap: 2px; margin: -4px -2px 0 0; }
.ws-note__btn, .ws-note-pill {
  cursor: pointer; border: none; background: transparent; color: var(--note-muted);
  font: inherit;
}
.ws-note__btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; padding: 0; }
.ws-note__btn svg { width: 18px; height: 18px; }
.ws-note__btn:hover { background: var(--note-hover); color: var(--note-text); }
.ws-note__btn:focus-visible, .ws-note-pill:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }

.ws-note-pill {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px;
  background: var(--note-bg); color: var(--note-text);
  border: 1px solid var(--note-border); border-left: 4px solid var(--tone);
  border-radius: 999px;
  box-shadow: var(--note-shadow);
  font-size: .9rem; font-weight: 700;
  animation: wsNoteIn .2s ease-out;
}
.ws-note-pill svg { width: 18px; height: 18px; color: var(--tone); }
.ws-note-pill:hover { transform: translateY(-1px); }

@keyframes wsNoteIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wsNoteGlow {
  0% { box-shadow: var(--note-shadow), 0 0 0 0 var(--tone); }
  100% { box-shadow: var(--note-shadow), 0 0 0 14px transparent; }
}

@media (max-width: 560px) {
  .ws-note { right: 10px; left: 10px; bottom: 10px; width: auto; gap: 10px; padding: 14px 8px 16px 12px; }
  .ws-note-pill { right: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-note, .ws-note.is-new, .ws-note-pill { animation: none; }
}
