/* Shared inbound flag display component — SafeChannel & Peace Path */

.ifd-bubble {
  border-radius: 12px;
  padding: 12px 16px;
  line-height: 1.6;
  word-wrap: break-word;
}

.ifd-bubble.ifd-amber {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
  color: rgba(232, 238, 246, 0.9);
}

.ifd-amber-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
  font-family: system-ui, sans-serif;
  margin-bottom: 8px;
}

.ifd-flagged-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  min-height: 80px;
}

.ifd-bubble-obscured {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.ifd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 18, 0.92);
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  gap: 10px;
  z-index: 2;
}

.ifd-flag-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fb7185;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: bold;
}

.ifd-flag-translation {
  font-family: Georgia, serif;
  font-size: 13px;
  color: rgba(232, 238, 246, 0.8);
  line-height: 1.55;
}

.ifd-flag-translation-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 238, 246, 0.3);
  font-family: system-ui, sans-serif;
  margin-bottom: 4px;
}

.ifd-flag-reasons {
  font-size: 12px;
  color: #fb7185;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

.ifd-warning {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  border-left: 2px solid rgba(251, 113, 133, 0.2);
  padding-left: 8px;
  margin: 4px 0;
}

.ifd-button-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.ifd-read-btn,
.ifd-skip-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  transition: all 0.12s;
}

.ifd-read-btn:hover,
.ifd-skip-btn:hover {
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
}

.ifd-read-btn {
  border-color: rgba(251, 113, 133, 0.35);
  color: #fb7185;
}

.ifd-read-btn:hover {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.6);
}

.ifd-legal-context {
  background: rgba(100, 116, 139, 0.06);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(232, 238, 246, 0.7);
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

.ifd-legal-context.high {
  background: rgba(127, 29, 29, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.ifd-legal-context.medium {
  background: rgba(120, 53, 15, 0.08);
  border-color: rgba(194, 65, 12, 0.2);
}

.ifd-legal-context.low {
  background: rgba(63, 94, 251, 0.06);
  border-color: rgba(96, 125, 255, 0.2);
}

.ifd-clean-message {
  color: rgba(232, 238, 246, 0.7);
  font-style: italic;
  font-size: 12px;
}

/* State 3: Original message bubble styled like incoming message */
.ifd-state-3-content {
  background: var(--sh-surface-lift, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--sh-border, rgba(160, 200, 180, 0.18));
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  margin-bottom: 10px;
  color: #e8eef6;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  filter: blur(3px);
  user-select: none;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.ifd-state-3-content.high-severity {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.ifd-state-3-content.medium-severity {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.3);
}

.ifd-state-3-content.revealed {
  filter: blur(0);
  user-select: text;
}

.ifd-state-3-note {
  font-size: 11px;
  color: rgba(232, 238, 246, 0.5);
  font-style: italic;
  text-align: center;
}
