/* ============================
   AIOS Landing  -  Transcript page
   Chat bubble layout (AIOS-style)
   Extends style.css
   ============================ */

.transcript-body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 168, 114, 0.06), transparent 50%),
    var(--ink);
}

/* ============================ HERO ============================ */
.transcript-hero {
  padding: 80px 32px 80px;
  border-bottom: 1px solid var(--line-soft);
}
.transcript-hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  color: var(--text);
}

/* ============================ META STRIP ============================ */
.transcript-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 44px 0 36px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-key {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.meta-val {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
@media (max-width: 760px) {
  .transcript-meta { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 440px) {
  .transcript-meta { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================ ACTIONS ============================ */
.transcript-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.btn.copied {
  background: #2a4d35;
  color: #d6f0d8;
  border-color: #2a4d35;
}
.btn-label { display: inline-block; }

/* ============================ CHAT SECTION ============================ */
.transcript-section {
  padding: 70px 32px 90px;
  background: var(--ink);
}

/* Color legend at the top of the chat */
.chat-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-phil { background: var(--accent); }
.legend-ben  { background: #6c8aa8; }
.legend-name { color: var(--text-soft); font-weight: 500; }
.legend-sep  { color: var(--text-mute); margin: 0 4px; }

/* ============================ BUBBLES ============================ */
.conversation {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bubble-row {
  display: flex;
  margin: 6px 0;
}
.bubble-row.bubble-left  { justify-content: flex-start; }
.bubble-row.bubble-right { justify-content: flex-end; }

.bubble-stack {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  min-width: 0;
}
.bubble-row.bubble-left  .bubble-stack { align-items: flex-start; }
.bubble-row.bubble-right .bubble-stack { align-items: flex-end; }

.bubble-speaker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 18px 4px 6px;
}
.bubble-phil .bubble-speaker { color: var(--accent); }
.bubble-ben  .bubble-speaker { color: #9bb8d6; }

.bubble {
  position: relative;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.bubble:hover {
  background: var(--ink-3);
}

/* Phil bubbles: left, accent-tinted */
.bubble-phil .bubble {
  background: rgba(201, 168, 114, 0.08);
  border-color: rgba(201, 168, 114, 0.22);
  border-bottom-left-radius: 4px;
}
.bubble-phil .bubble:hover {
  background: rgba(201, 168, 114, 0.13);
}

/* Ben bubbles: right, blue-tinted */
.bubble-ben .bubble {
  background: rgba(108, 138, 168, 0.10);
  border-color: rgba(108, 138, 168, 0.26);
  border-bottom-right-radius: 4px;
}
.bubble-ben .bubble:hover {
  background: rgba(108, 138, 168, 0.16);
}

/* Other speakers (fallback) */
.bubble-other .bubble {
  background: var(--ink-2);
  border-color: var(--line);
}

.bubble-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  font-family: var(--font-sans);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Consecutive bubbles from the same speaker get tighter spacing
   (the speaker label is only on the first one anyway) */
.bubble-row + .bubble-row.bubble-left .bubble-stack:not(:has(.bubble-speaker)),
.bubble-row + .bubble-row.bubble-right .bubble-stack:not(:has(.bubble-speaker)) {
  margin-top: -2px;
}

/* Subtle scale on hover */
.bubble-row:hover .bubble { transform: translateY(-1px); }

/* ============================ MOBILE ============================ */
@media (max-width: 640px) {
  .transcript-hero { padding: 60px 20px 60px; }
  .transcript-section { padding: 40px 20px 60px; }
  .bubble-stack { max-width: 92%; }
  .bubble { padding: 12px 16px; border-radius: 14px; }
  .bubble-text { font-size: 15px; }
  .chat-legend { font-size: 12px; }
}

/* ============================ ACCESSIBILITY ============================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
