/* ========================================
   GUARDIAN ALERT BAR — Risk warning bar
   Sits between thread header and body,
   replacing the sfBar when Guardian risk
   is detected. Conditional colours match
   the Guardian pill tab verdicts.

   Mirrors suggested-flow-bar.css structure.
   ======================================== */

/* Container */
.guardian-alert-bar {
  position: relative;
  flex-shrink: 0;
}

/* Inline bar — base layout (colours set by verdict modifier) */
.guardian-alert-bar__inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 22px;
  border-bottom: 1px solid var(--color-border-solid, #e5e7eb);
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Shield icon */
.guardian-alert-bar__icon {
  font-size: 12px;
  flex-shrink: 0;
}

/* GUARDIAN label */
.guardian-alert-bar__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

/* Verdict text (e.g. "Needs Attention") */
.guardian-alert-bar__verdict {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Score badge */
.guardian-alert-bar__score {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Items flagged count */
.guardian-alert-bar__detail {
  font-size: 11px;
  color: var(--color-text-tertiary, #94a3b8);
  flex-shrink: 0;
}

/* Spacer to push arrow right */
.guardian-alert-bar__spacer {
  flex: 1;
}

/* Arrow indicator */
.guardian-alert-bar__arrow {
  font-size: 8px;
  color: var(--color-text-tertiary, #94a3b8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* ----------------------------------------
   VERDICT COLOUR VARIANTS
   ---------------------------------------- */

/* Caution (red) — score < 50 or ≥ 2 high issues */
.guardian-alert-bar--caution .guardian-alert-bar__inline {
  background: linear-gradient(135deg, #fef2f2 0%, var(--color-surface, #ffffff) 100%);
  border-bottom-color: rgba(239, 68, 68, 0.2);
}

.guardian-alert-bar--caution .guardian-alert-bar__inline:hover {
  background: linear-gradient(135deg, #fee2e2 0%, var(--color-surface, #ffffff) 100%);
}

.guardian-alert-bar--caution .guardian-alert-bar__label {
  color: var(--color-error, #ef4444);
}

.guardian-alert-bar--caution .guardian-alert-bar__score {
  color: var(--color-error, #ef4444);
}

/* Review (amber) — score 50-79 or 1 high issue */
.guardian-alert-bar--review .guardian-alert-bar__inline {
  background: linear-gradient(135deg, #fffbeb 0%, var(--color-surface, #ffffff) 100%);
  border-bottom-color: rgba(245, 158, 11, 0.2);
}

.guardian-alert-bar--review .guardian-alert-bar__inline:hover {
  background: linear-gradient(135deg, #fef3c7 0%, var(--color-surface, #ffffff) 100%);
}

.guardian-alert-bar--review .guardian-alert-bar__label {
  color: var(--color-warning, #f59e0b);
}

.guardian-alert-bar--review .guardian-alert-bar__score {
  color: var(--color-warning, #f59e0b);
}

/* ----------------------------------------
   HIDE IN COMPOSE MODE
   ---------------------------------------- */
.thread-view--compose .guardian-alert-bar {
  display: none !important;
}
