/**
 * Agent Console Ticker styles — SWARM landing Module 1 (seat 3 §1A)
 * Owner: WEB.PULSE-WEB + WEB.GRAIN cross-check
 *
 * Hard rules respected:
 *   - W-001..W-005 (no "уродская рамка", no flicker, brand palette)
 *   - W-103 (no layout shift)
 *   - W-200 (prefers-reduced-motion fallback)
 *   - W-201 (contrast ≥ 4.5:1 against #0a0a0f)
 *
 * Bundle target: ≤ 2 kB minified.
 */

.agent-console-section {
  padding: 48px 0 64px;
  background: #0a0a0f;
  position: relative;
  overflow: hidden;
}

.agent-console-section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.agent-console-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  margin-bottom: 14px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 50px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00E5FF;
}

.agent-console-section__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: agentConsoleDotPulse 1.6s ease-in-out infinite;
}

.agent-console-section__title {
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.agent-console-section__sub {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  max-width: 640px;
}

.agent-console {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.025) 0%, rgba(0, 119, 255, 0.015) 100%);
  border: 1px solid rgba(0, 229, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* No box-shadow rim — avoids the "уродская рамка" pattern */
}

.agent-console__entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 480ms ease, transform 480ms ease;
  /* Tabular nums + monospace = no shift when seconds-ago changes */
  font-variant-numeric: tabular-nums;
}

.agent-console__entry--enter {
  opacity: 0;
  transform: translateY(-6px);
}

.agent-console__entry--fallback {
  color: rgba(255, 255, 255, 0.45);
  font-style: normal;
}

.agent-console__from,
.agent-console__to {
  font-weight: 700;
  color: #00E5FF;
  letter-spacing: 0.02em;
  /* Contrast vs #0a0a0f: ≈ 9.4:1 — passes WCAG AAA */
}

.agent-console__to {
  color: #8FB3FF;
  /* Contrast vs #0a0a0f: ≈ 7.1:1 — passes WCAG AAA */
}

.agent-console__arrow {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.agent-console__sep {
  color: rgba(255, 255, 255, 0.3);
}

.agent-console__action {
  color: rgba(255, 255, 255, 0.85);
  /* Contrast ≈ 11.5:1 — passes WCAG AAA */
}

.agent-console__target {
  color: rgba(255, 255, 255, 0.55);
  /* Contrast ≈ 4.9:1 — passes WCAG AA */
}

.agent-console__commit {
  color: #00E5FF;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  padding-bottom: 1px;
  transition: color 200ms ease, border-color 200ms ease;
}

.agent-console__commit:hover {
  color: #6FE9FF;
  border-bottom-color: rgba(0, 229, 255, 0.7);
}

.agent-console__commit:focus-visible {
  outline: 2px solid #00E5FF;
  outline-offset: 2px;
  border-radius: 2px;
  /* Contrast ≈ 9.4:1 — visible focus, no "уродская рамка" */
}

.agent-console__ago {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  /* Contrast ≈ 4.6:1 — passes WCAG AA for large/secondary text */
}

@keyframes agentConsoleDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #10B981; }
  50%      { opacity: 0.5; box-shadow: 0 0 16px #10B981; }
}

/* W-200: prefers-reduced-motion — no animations, instant state. */
@media (prefers-reduced-motion: reduce) {
  .agent-console-section__eyebrow::before { animation: none; }
  .agent-console__entry {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .agent-console__entry--enter {
    opacity: 1;
    transform: none;
  }
}

/* Mobile responsive */
@media (max-width: 600px) {
  .agent-console-section { padding: 36px 0 48px; }
  .agent-console {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.65;
  }
  .agent-console__entry {
    gap: 6px;
  }
  .agent-console__ago {
    margin-left: 0;
    width: 100%;
    font-size: 11px;
  }
}
