/* ════════════════════════════════════════════════════════════════
   RFQ RESULT CARD
   The outcome of a submission: success / error, with icon, title,
   body, ticket reference, clickable invalid-field jumps and a
   collapsed technical detail block.
   ════════════════════════════════════════════════════════════════ */
.rfq-form__output {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid;
  border-radius: var(--radius-m);
  font-size: var(--fs-small);
  line-height: 1.55;
  /* Entrance — the card appears right where the eye already is */
  animation: rfq-result-in 320ms var(--ease-out-quart);
}
@keyframes rfq-result-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .rfq-form__output { animation: none; }
}

/* ── Icon ─────────────────────────────────────────────────────── */
.rfq-result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

/* ── Body ─────────────────────────────────────────────────────── */
.rfq-result__body { flex: 1; min-width: 0; }
.rfq-result__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}
.rfq-result__text {
  margin: 0;
  color: inherit;
  opacity: 0.88;
}

/* ── Ticket reference ─────────────────────────────────────────── */
.rfq-result__ref {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px dashed currentColor;
  border-radius: var(--radius-s);
  opacity: 0.9;
}
.rfq-result__ref-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}
.rfq-result__ref code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  user-select: all;
}

/* ── Invalid-field jumps (error only) ─────────────────────────── */
.rfq-result__fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}
.rfq-result__field {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  padding: var(--space-1) var(--space-3);
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.rfq-result__field::before {
  content: '↓';
  margin-inline-end: var(--space-1);
  opacity: 0.7;
}
.rfq-result__field:hover,
.rfq-result__field:focus-visible {
  background: currentColor;
  outline: 0;
}
.rfq-result__field:hover::before,
.rfq-result__field:focus-visible::before { opacity: 1; }

/* ── Technical detail ─────────────────────────────────────────── */
.rfq-result__detail {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}
.rfq-result__detail summary {
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  user-select: none;
  padding-block: var(--space-1);
}
.rfq-result__detail summary:hover { opacity: 1; }
.rfq-result__detail pre {
  margin: var(--space-2) 0 0;
  padding: var(--space-3);
  background: rgba(0, 0, 0, 0.32);
  border-inline-start: 2px solid currentColor;
  border-radius: var(--radius-s);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  opacity: 0.85;
}

/* ── States ───────────────────────────────────────────────────── */
.rfq-form__output[data-state="success"] {
  border-color: var(--lime-500);
  color: var(--lime-500);
  background: rgba(159, 255, 0, 0.05);
}
.rfq-form__output[data-state="error"] {
  border-color: var(--alert-500);
  color: var(--alert-500);
  background: rgba(229, 50, 45, 0.05);
}

/* ── In-flight state on the form ──────────────────────────────── */
.rfq-form[data-submitting="true"] .rfq-form__grid,
.rfq-form[data-submitting="true"] .rfq-form__consent {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out-quart);
}
.rfq-form__meta[hidden] { display: none; }

/* Status line sits next to the button and pulses while in flight */
.rfq-form__meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--signal-500);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.rfq-form__meta::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-500);
  animation: rfq-pulse 1.1s var(--ease-out-quart) infinite;
}
@keyframes rfq-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .rfq-form__meta::before { animation: none; }
}

/* ── Narrow screens: stack the icon above the copy ────────────── */
@media (max-width: 560px) {
  .rfq-form__output { flex-direction: column; gap: var(--space-3); }
  .rfq-result__icon { width: 30px; height: 30px; }
}

/* ════════════════════════════════════════════════════════════════
   CHAT SENDER LABELS
   Distinguishes an AuraOS AI auto-reply from a human engineer reply.
   ════════════════════════════════════════════════════════════════ */
.chat-msg__sender {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-400);
  margin-bottom: 3px;
  padding-inline-start: 2px;
}
.chat-msg--system[data-sender="AuraOS AI"] .chat-msg__sender { color: var(--brass-400); }
.chat-msg--system[data-sender="Engineering"] .chat-msg__sender { color: var(--lime-500); }
