/* EquiSense — Concall Deep-Dive Tab Styles */

/* ─── Concall Tab ──────────────────────────────────────────────────────── */
.concall-full-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-family: var(--font-body);
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: max-height 0.4s ease;
}
.concall-full-note.collapsed {
  max-height: 0;
  overflow: hidden;
}
.concall-full-note h1 { font-size: 17px; font-weight: 800; color: var(--text-primary); margin: 20px 0 10px; font-family: var(--font-heading); }
.concall-full-note h2 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 18px 0 8px; }
.concall-full-note h3 { font-size: 12px; font-weight: 700; color: var(--text-primary); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; line-height: 18px; }
.concall-full-note p { margin: 8px 0; font-size: 14px; line-height: 1.7; }
.concall-full-note ul { padding-left: 20px; margin: 8px 0; }
.concall-full-note li { margin-bottom: 6px; }
.concall-full-note b, .concall-full-note strong { color: var(--text-primary); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   Concall Tab — Sections, Header, Tags, Body
   ═══════════════════════════════════════════════════════════════════════════ */

.concall-sections {
  display: flex; flex-direction: column; gap: 16px;
  font-family: var(--font-body);
}
.concall-header {
  padding: 20px 24px;
}
.concall-header-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.concall-date {
  font-size: 12px; color: var(--text-tertiary);
}
.concall-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.concall-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  background: var(--accent-tint-badge); color: var(--accent);
}
.concall-body {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
/* Quarter picker styles are in dd-earnings.css (shared by both tabs) */
.concall-loading {
  text-align: center; padding: 32px 0; color: var(--text-tertiary); font-size: 13px;
}

.concall-header-audio { margin-top: 14px; }
.concall-audio-section {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 10px 16px; border-radius: 10px;
  background: var(--tint-2); border: 1px solid var(--tint-5);
}
.concall-audio-label {
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; display: flex; align-items: center; gap: 5px;
}
.concall-audio-section .concall-audio-player { flex: 1; }

/* ── Concall Media (Audio + Transcript) ────────────────────────────────── */
.concall-media {
  display: flex; flex-direction: column; gap: 12px;
}
.concall-audio-wrap {
  border-radius: 10px; overflow: hidden;
  background: var(--tint-3); padding: 12px;
  border: 1px solid var(--tint-6);
}
.concall-audio-player {
  width: 100%; height: 40px; border-radius: 6px;
  outline: none;
}
/* Dark mode audio player overrides */
.concall-audio-player::-webkit-media-controls-panel { background: var(--tint-4); }
.concall-transcript-btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  background: var(--tint-3); border: 1px solid var(--tint-8);
  color: var(--accent); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
  text-decoration: none;
}
.concall-transcript-btn:hover {
  background: var(--accent-tint-bg); border-color: var(--accent-border);
}

/* ── Official transcript PDF link (NSE/BSE source-of-truth) ──────────────
   Hero affordance when concall.transcriptUrl is present. Replaces the
   AI-generated transcript because the source PDF is authoritative.

   Design notes (Jony Ive pass): single quiet block — title primary, source
   subordinate, trailing arrow as the universal "external" mark. No icons,
   no badge colors, no shadow chrome. Hover lifts only the border so the
   eye is invited, not pushed. Matches the .concall-transcript-btn family
   in radius and family but commits more height + a two-line layout because
   it's the page's *primary* read for this concall. */
.concall-pdf-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--tint-1, rgba(255,255,255,0.02));
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 100ms ease;
  font-family: var(--font-body);
}
.concall-pdf-link:hover {
  border-color: var(--accent);
  background: var(--accent-tint-xs, rgba(52,211,153,0.04));
}
.concall-pdf-link:active { transform: scale(0.997); }
.concall-pdf-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.concall-pdf-link-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.concall-pdf-link-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.concall-pdf-link-source {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.concall-pdf-link-arrow {
  font-size: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  line-height: 1;
  transition: color 180ms ease, transform 180ms ease;
}
.concall-pdf-link:hover .concall-pdf-link-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ── Request Concall Analysis Button ─────────────────────────────────── */
.concall-request-btn {
  display: inline-block; padding: 12px 28px; border-radius: 10px;
  background: var(--accent-tint); border: 1px solid var(--accent);
  color: var(--accent); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
  margin-top: 16px;
}
.concall-request-btn:hover {
  background: var(--accent-border); transform: translateY(-1px);
}
.concall-request-btn:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
}
.concall-request-btn-done {
  background: var(--tint-3); border-color: var(--tint-8);
  color: var(--text-tertiary); cursor: default;
}

/* ── Concall Dashboard (structured summary) ──────────────────────────── */
.concall-dash-badges {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.concall-dash-badge {
  flex: 1; min-width: 120px; padding: 12px 16px; border-radius: 10px;
  background: var(--tint-3); border: 1px solid var(--tint-5);
  border-left: 3px solid var(--text-tertiary);
}
.cdb-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.cdb-sub {
  font-size: 11px; color: var(--text-tertiary); margin-top: 2px;
}

/* Business units & initiatives */
.concall-bus-units {
  display: flex; flex-direction: column; gap: 8px;
}
.concall-bus-unit {
  padding: 14px 18px; border-radius: 8px;
  background: var(--tint-1);
}
.cbu-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.cbu-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.cbu-badge {
  font-size: 11px; font-weight: 600;
}
.cbu-sub {
  font-size: 11px; color: var(--text-tertiary); margin-bottom: 6px;
}
.cbu-desc {
  font-size: 14px; line-height: 1.7; color: var(--text-secondary);
}

/* Order book progress bar */
.concall-ob-bar { margin-top: 8px; }
.cob-track {
  height: 12px; border-radius: 6px;
  background: var(--tint-4); overflow: hidden;
}
.cob-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.6s ease;
}
.cob-labels {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 12px; color: var(--text-tertiary);
}

/* ── Concall Dashboard: tone classes ──────────────────────────────────── */
.tone-positive { color: var(--green); }
.tone-negative { color: var(--red); }
.tone-neutral { color: var(--text-secondary); }
.tone-border-pos { border-left: 3px solid var(--accent-border-vivid); }
.tone-border-neg { border-left: 3px solid var(--red-border-vivid); }
.tone-border-neutral { border-left: 3px solid var(--blue-border-vivid); }

/* ── Concall Dashboard: semantic classes ─────────────────────────────── */
.concall-title { margin-bottom: 4px; }
.concall-status-wrap { margin-bottom: 12px; }
.concall-loading-spinner { margin-bottom: 8px; }
.concall-confidence {
  font-size: 11px; color: var(--text-tertiary); margin-bottom: 12px;
}
.concall-margins { margin-top: 12px; }
.concall-subsection { margin-top: 12px; }
.concall-body-sm {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.concall-priority-block { margin-bottom: 12px; }
.concall-priority-block:last-child { margin-bottom: 0; }
.concall-transcript-body { margin-top: 12px; }
.concall-md-bold { color: var(--text-primary); }
.concall-collapsible-title { cursor: pointer; }
.concall-collapse-hint {
  font-size: 10px; color: var(--text-tertiary); font-weight: 400;
}

/* Transcript header row: "AI Generated Transcript" on the left, optional
   "View transcript PDF ↗" link on the right. The link only renders when
   concall.transcriptUrl is a PDF — opens in a new tab, doesn't toggle the
   collapsible (event.stopPropagation on the anchor). */
.concall-transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.concall-pdf-inline-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--tint-8);
  background: transparent;
  transition: border-color 160ms ease, background 160ms ease, transform 100ms ease;
}
.concall-pdf-inline-link:hover {
  border-color: var(--accent);
  background: var(--accent-tint-bg, rgba(52,211,153,0.06));
}
.concall-pdf-inline-link:active { transform: scale(0.97); }

/* Concall badge (tone-aware, replaces inline badgeHtml) */
.concall-dash-badge.tone-border-pos .cdb-title { color: var(--green); }
.concall-dash-badge.tone-border-neg .cdb-title { color: var(--red); }
.concall-dash-badge.tone-border-neutral .cdb-title { color: var(--text-secondary); }

/* Concall promises list (Management Guidance) */
.concall-promises-list {
  display: flex; flex-direction: column; gap: 10px;
}
.concall-promise-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.7; color: var(--text-secondary);
}
.concall-promise-icon {
  color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.concall-promise-text { flex: 1; }
.concall-promise-tf {
  flex-shrink: 0; font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); background: var(--tint-4);
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
  margin-top: 1px;
}

/* Concall key-value rows (project summary etc.) */
.concall-kv-list { margin-top: 12px; }
.concall-kv-row {
  display: flex; justify-content: space-between; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.concall-kv-label { color: var(--text-tertiary); }
.concall-kv-value { color: var(--text-primary); font-weight: 600; }

/* ── Concall Mobile Overrides ────────────────────────────────────────── */
@media (max-width: 600px) {
  .concall-header { padding: 16px; }
  .concall-header-row { flex-direction: column; align-items: flex-start; }
  .concall-audio-wrap { padding: 8px; }
}
