/* The mark on text an AI wrote (App\Support\AiMark, <x-ai-mark>). It reads
   like the status badges: mono capitals in a hairline box with a 7 px square.
   A draft takes the warning colour and an approved text the primary colour,
   so a reader sees at a glance whether a person has approved it. The words
   say it too, so the colour is never the only signal. The detail (who
   approved it, or that nobody has) follows in plain muted text. */
.ai-mark {
  --ai-mark-color: var(--primary);
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font: 400 var(--fs-label)/1.3 var(--font-sans);
  vertical-align: middle;
}

.ai-mark-label {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--ai-mark-color) 40%, var(--border));
  border-radius: var(--radius-md);
  color: var(--ink);
  background: transparent;
  font: 400 var(--fs-label)/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ai-mark-label::before {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--ai-mark-color);
  content: "";
}

.ai-mark[hidden] {
  display: none;
}

.ai-mark-draft {
  --ai-mark-color: var(--amber);
}

.ai-mark-generated {
  --ai-mark-color: var(--muted-2);
}

.ai-mark-detail {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media print {
  .ai-mark {
    font-size: 11px;
  }

  .ai-mark-label {
    min-height: 0;
    padding: 1px 6px;
    font-size: 11px;
  }
}

/* Whether an action uses AI (<x-ai-use>, explore.js): mono capitals in a hairline box like the mark
   above, with a round dot that is filled in the primary colour when Claude is asked and hollow when
   the app does the work alone. The words say it, so the dot is never the only signal. */
.ai-use {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font: 400 var(--fs-label)/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}

.ai-use::before {
  width: 7px;
  height: 7px;
  flex: none;
  box-sizing: border-box;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.ai-use.is-ai {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  color: var(--ink);
}

.ai-use.is-ai::before {
  border-color: var(--primary);
  background: var(--primary);
}

.ai-use[hidden] {
  display: none;
}
