/* sandbox-triage.css — styles for Scene 3: Post-op Red-Flag Triage demo in /sandbox
   Owns: all .scene-*, .sms-*, .triage-panel, .ai-panel, .nurse-notify, .audit-panel,
         .severity-badge, .flagged-chip, .rec-action, .symptom-path-btn styles.
   Does NOT own: sandbox shell layout, nav, inbox, preop, slots, reports styles (those live inline in sandbox.ejs). */

/* ===== TRIAGE DEMO SCENE (Scene 3) ===== */
.scene-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.scene-header-left { flex: 1; min-width: 0; }
.scene-steps-bar {
  display: flex; gap: 0.35rem; align-items: center;
  margin-bottom: 0.75rem; flex-wrap: wrap;
}
.scene-step {
  font-size: 0.72rem; font-weight: 600; color: #8A8A8A;
  padding: 0.2rem 0.65rem; border-radius: 100px;
  background: #F0EAE0; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.scene-step.active { background: #0F2B33; color: #fff; }
.scene-step.done { background: #EAFAF1; color: #1A7A4A; }
.scene-header-actions { display: flex; gap: 0.5rem; flex-shrink: 0; align-items: flex-start; }
.btn-reset-scene {
  background: transparent; border: 1.5px solid #D8D8D8; color: #4A4A4A;
  font-size: 0.78rem; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-reset-scene:hover { background: #F0EAE0; border-color: #0F2B33; }

.symptom-paths { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.symptom-path-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem; border-radius: 8px; border: 1.5px solid #D8D8D8;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; background: #fff;
  color: #4A4A4A; transition: all 0.15s; white-space: nowrap;
}
.symptom-path-btn.active { border-color: #0F2B33; background: #0F2B33; color: #fff; }
.symptom-path-btn.active-red { border-color: #C0392B; background: #FDEDEC; color: #C0392B; }
.symptom-path-btn.active-amber { border-color: #D4840A; background: #FEF3DC; color: #D4840A; }
.symptom-path-btn.active-green { border-color: #1A7A4A; background: #EAFAF1; color: #1A7A4A; }

.demo-stage {
  display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem;
  min-height: 500px;
}
@media (max-width: 900px) { .demo-stage { grid-template-columns: 1fr; } }

/* SMS conversation pane */
.sms-pane {
  background: #fff; border-radius: 12px; border: 1px solid rgba(15,43,51,0.08);
  display: flex; flex-direction: column; overflow: hidden;
}
.sms-pane-header {
  background: #0F2B33; padding: 0.9rem 1.1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.sms-pane-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #D4840A; color: #fff; font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sms-pane-name { font-weight: 700; color: #fff; font-size: 0.9rem; }
.sms-pane-meta { font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.sms-pane-status {
  margin-left: auto; font-size: 0.68rem; font-weight: 700;
  color: #2ECC71; display: flex; align-items: center; gap: 0.3rem;
}
.sms-pane-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #2ECC71; }

.sms-pane-msgs {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem;
  min-height: 220px;
}

.sms-bubble-wrap { display: flex; flex-direction: column; }
.sms-bubble-wrap.out { align-items: flex-end; }
.sms-bubble-wrap.in { align-items: flex-start; }
.sms-bubble {
  max-width: 82%; padding: 0.65rem 0.9rem; border-radius: 12px;
  font-size: 0.85rem; line-height: 1.5; position: relative;
}
.sms-bubble.out { background: #0F2B33; color: #fff; border-bottom-right-radius: 3px; }
.sms-bubble.in { background: #F0EAE0; color: #0F2B33; border-bottom-left-radius: 3px; }
.sms-bubble-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 0.2rem; opacity: 0.6;
}
.sms-bubble-time { font-size: 0.68rem; opacity: 0.5; margin-top: 0.25rem; display: block; }

/* typing indicator */
.typing-indicator {
  display: none; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.9rem; background: #F0EAE0; border-radius: 12px;
  max-width: 80px; border-bottom-left-radius: 3px;
}
.typing-indicator.visible { display: flex; }
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(15,43,51,0.4); animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* AI triage panel (right pane) */
.triage-panel {
  display: flex; flex-direction: column; gap: 1rem;
}
.ai-panel {
  background: #fff; border-radius: 12px; border: 1px solid rgba(15,43,51,0.08);
  padding: 1.1rem 1.25rem; opacity: 0; transition: opacity 0.5s;
}
.ai-panel.lit { opacity: 1; }
.ai-panel-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #8A8A8A; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.ai-panel-label-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8A8A8A;
}
.ai-panel.lit .ai-panel-label-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* severity badge */
.severity-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 700; font-size: 0.87rem;
  margin-bottom: 0.75rem;
}
.severity-badge.high { background: #FDEDEC; color: #C0392B; border: 1px solid #F1948A; }
.severity-badge.medium { background: #FEF3DC; color: #D4840A; border: 1px solid #F8C471; }
.severity-badge.low { background: #EAFAF1; color: #1A7A4A; border: 1px solid #82E0AA; }
.severity-badge-icon { font-size: 1rem; }

/* flagged symptoms */
.flagged-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.flagged-chip {
  font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.65rem;
  border-radius: 100px; background: #FDEDEC; color: #C0392B;
  border: 1px solid rgba(192,57,43,0.2);
}
.flagged-chip.amber { background: #FEF3DC; color: #D4840A; border-color: rgba(212,132,10,0.2); }
.flagged-chip.green { background: #EAFAF1; color: #1A7A4A; border-color: rgba(26,122,74,0.2); }

/* recommended action */
.rec-action {
  background: #F8F5EE; border-radius: 8px; padding: 0.75rem 0.9rem;
  font-size: 0.83rem; line-height: 1.5; color: #0F2B33;
}
.rec-action strong { color: #C0392B; }
.rec-action.amber strong { color: #D4840A; }
.rec-action.green strong { color: #1A7A4A; }

/* nurse notification */
.nurse-notify {
  background: #fff; border-radius: 12px; border: 1px solid rgba(15,43,51,0.08);
  padding: 1.1rem 1.25rem; opacity: 0; transition: opacity 0.5s;
}
.nurse-notify.lit { opacity: 1; }
.nurse-notify-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.nurse-notify-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: #C0392B; color: #fff; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nurse-notify-icon.amber { background: #D4840A; }
.nurse-notify-icon.green { background: #1A7A4A; }
.nurse-notify-name { font-weight: 700; font-size: 0.9rem; color: #0F2B33; }
.nurse-notify-sub { font-size: 0.72rem; color: #8A8A8A; }
.nurse-notify-body { font-size: 0.82rem; color: #4A4A4A; line-height: 1.5; margin-bottom: 0.85rem; }
.nurse-notify-timeline {
  display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem;
}
.nurse-timeline-item {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: #4A4A4A;
}
.nurse-timeline-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #D4840A;
}
.nurse-timeline-dot.red { background: #C0392B; }
.nurse-timeline-dot.green { background: #1A7A4A; }
.nurse-call-btn {
  width: 100%; padding: 0.65rem; border-radius: 8px;
  background: #C0392B; color: #fff; border: none; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.nurse-call-btn:hover { background: #A93226; }
.nurse-call-btn.amber { background: #D4840A; }
.nurse-call-btn.amber:hover { background: #F0A836; }
.nurse-call-btn.green { background: #1A7A4A; }
.nurse-call-btn.green:hover { background: #148A52; }
.nurse-call-btn:disabled { background: #1A7A4A; cursor: default; }

/* audit log */
.audit-panel {
  background: #fff; border-radius: 12px; border: 1px solid rgba(15,43,51,0.08);
  padding: 1.1rem 1.25rem; opacity: 0; transition: opacity 0.5s;
}
.audit-panel.lit { opacity: 1; }
.audit-entry {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.78rem; color: #4A4A4A; line-height: 1.5;
}
.audit-time { font-size: 0.68rem; font-weight: 600; color: #8A8A8A; white-space: nowrap; margin-top: 0.1rem; }
.audit-icon { font-size: 0.85rem; flex-shrink: 0; }
.audit-text strong { color: #C0392B; }
.audit-text strong.amber { color: #D4840A; }
.audit-text strong.green { color: #1A7A4A; }

/* scene caption */
.scene-caption {
  background: linear-gradient(135deg, #0F2B33, #1A4A56);
  border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1.25rem;
  color: rgba(255,255,255,0.85); font-size: 0.85rem; line-height: 1.6;
  display: flex; align-items: center; gap: 1rem;
}
.scene-caption-icon { font-size: 1.5rem; flex-shrink: 0; }
.scene-caption em { color: #F0A836; font-style: normal; font-weight: 700; }
