/* ============================================================================
   TRANSCRIPT STAGE — Intelligence Design System
   Single source of truth. Extracted from components.css (3 duplicate blocks).
   Uses levitating shadows, ghost badges, Satoshi typography, semantic colors.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Shared Primitives
   --------------------------------------------------------------------------- */

/* Nested card with bevel + hover lift (lighter than artifact-card) */
.transcript-levitate {
	background: var(--bg-card, #FDFDFD);
	border: none;
	border-radius: 12px;
	box-shadow:
		inset 1px 1px 0 rgba(255, 255, 255, 1),
		0 0 0 1px rgba(0, 0, 0, 0.04),
		0 2px 4px rgba(0, 0, 0, 0.04),
		0 8px 16px rgba(0, 0, 0, 0.02);
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.transcript-levitate:hover {
	transform: translateY(-1px);
	box-shadow:
		inset 1px 1px 0 rgba(255, 255, 255, 1),
		0 0 0 1px rgba(0, 0, 0, 0.04),
		0 4px 8px rgba(0, 0, 0, 0.06),
		0 16px 32px rgba(0, 0, 0, 0.03);
}

/* Section-level levitating card (top-level wrapper with accent glow).
   Used by .transcript-strategic, .transcript-timeline, .transcript-feature-requests.
   Each sets --card-accent for semantic glow color. */
.transcript-section-card {
	background: var(--bg-card, #FDFDFD);
	border: none;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 24px;
	box-shadow:
		inset 1px 1px 0 rgba(255, 255, 255, 1),
		0 0 0 1px rgba(0, 0, 0, 0.05),
		0 2px 4px rgba(0, 0, 0, 0.05),
		0 12px 24px rgba(0, 0, 0, 0.02),
		0 32px 64px -12px color-mix(in srgb, var(--card-accent, #94a3b8) 12%, transparent);
}

/* Shared section title: 15px/700/-0.035em (inherits Satoshi from .stage-content-wrapper) */
.transcript-section-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.035em;
	color: var(--text-primary, #111827);
	margin: 0 0 16px 0;
}

/* Show-more pill button (replaces inline JS styles) */
.transcript-show-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
	padding: 6px 14px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid var(--border-subtle, #E5E7EB);
	background: color-mix(in srgb, #3B82F6 6%, transparent);
	color: var(--text-muted, #6B7280);
	box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 1);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.transcript-show-more-btn:hover {
	background: color-mix(in srgb, #3B82F6 12%, transparent);
	border-color: #93C5FD;
}

/* Details/summary (inherits Satoshi from .stage-content-wrapper) */
.transcript-details-summary {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--text-secondary, #374151);
	cursor: pointer;
	padding: 8px 0;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	user-select: none;
}

.transcript-details-summary::-webkit-details-marker {
	display: none;
}

/* ---------------------------------------------------------------------------
   Hero Section
   --------------------------------------------------------------------------- */

.transcripts-hero-layout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.transcripts-details-hero {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.transcripts-details-hero-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.035em;
	color: var(--text-primary, #111827);
	margin-bottom: 8px;
}

.transcripts-details-hero-subtitle {
	font-size: 16px;
	color: var(--text-muted, #4b5563);
	margin-bottom: 16px;
}

.transcripts-details-hero-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.transcripts-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	background: var(--bg-hover, #f3f4f6);
	border: 1px solid var(--border-subtle, #e5e7eb);
	border-radius: 20px;
	font-size: 13px;
	color: var(--text-secondary, #374151);
}

.transcripts-chip strong {
	font-weight: 600;
	color: var(--text-primary, #111827);
}

.transcripts-cost-badge {
	background: var(--bg-hover, #f3f4f6);
	color: var(--text-muted, #6b7280);
}

/* ---------------------------------------------------------------------------
   At a Glance
   --------------------------------------------------------------------------- */

.transcript-at-a-glance {
	margin-bottom: 24px;
}

/* Title uses .transcript-section-title via HTML class */

/* Negative margin + padding trick: gives shadows room to paint beyond
   card edges without shifting the grid's visual alignment */
.transcript-summaries-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	padding: 8px;
	margin: -8px;
}

/* Legacy summary card (unused in new InsightSummaryGrid, kept for compat) */
.transcript-summary-card {
	display: flex;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--border-subtle, #e5e7eb);
	border-radius: 8px;
	background: var(--bg-card, #ffffff);
}

.transcript-summary-icon {
	display: none;
}

.transcript-summary-content {
	flex: 1;
}

.transcript-summary-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--text-muted, #6b7280);
	margin-bottom: 4px;
}

.transcript-summary-text {
	font-size: 13px;
	color: var(--text-primary, #111827);
	line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   Strategic Analysis — Levitating section card
   --------------------------------------------------------------------------- */

.transcript-strategic { --card-accent: #D97706; }

.transcript-strategic-section {
	background: var(--bg-hover, #f9fafb);
	border: none;
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 12px;
	box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 1);
}

.transcript-strategic-section:last-child {
	margin-bottom: 0;
}

.transcript-strategic-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--text-muted, #6b7280);
	margin-bottom: 4px;
}

.transcript-strategic-text {
	font-size: 13px;
	color: var(--text-primary, #111827);
	line-height: 1.5;
}

.transcript-strategic-list {
	margin: 0;
	padding-left: 16px;
	font-size: 13px;
	color: var(--text-primary, #111827);
}

.transcript-strategic-list li {
	margin-bottom: 4px;
}

.transcript-strategic-risks {
	background: color-mix(in srgb, #DC2626 5%, transparent);
}

.transcript-strategic-risks .transcript-strategic-label {
	color: #DC2626;
}

.transcript-strategic-opps {
	background: color-mix(in srgb, #10B981 5%, transparent);
}

.transcript-strategic-opps .transcript-strategic-label {
	color: #10B981;
}

/* ---------------------------------------------------------------------------
   Relationship Timeline — Levitating section card
   --------------------------------------------------------------------------- */

.transcript-timeline { --card-accent: #7C3AED; }

.transcript-timeline-periods {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.transcript-period-card {
	padding: 14px;
	/* .transcript-levitate class added via JS for shadow + bevel */
}

.transcript-period-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.transcript-period-name {
	font-weight: 600;
	font-size: 13px;
	color: var(--text-primary, #111827);
}

/* Fallback for non-JS sentiment (ghost badge is rendered via JS) */
.transcript-period-sentiment {
	font-size: 12px;
	color: var(--text-secondary, #6b7280);
	background: var(--bg-hover, #f3f4f6);
	padding: 2px 8px;
	border-radius: 12px;
}

.transcript-period-drivers {
	font-size: 12px;
	margin-bottom: 6px;
	padding-left: 12px;
	border-left: 2px solid var(--border-subtle, #e5e7eb);
}

.transcript-driver-positive {
	border-left-color: var(--status-success, #16a34a);
	color: var(--text-secondary, #374151);
}

.transcript-driver-concern {
	border-left-color: var(--status-warm, #d97706);
	color: var(--text-secondary, #374151);
}

/* Period-level feature requests (inline) */
.transcript-period-features {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed var(--border-subtle, #e5e7eb);
}

.transcript-features-header {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--text-muted, #6b7280);
	margin-bottom: 4px;
}

.transcript-features-list {
	margin: 0;
	padding-left: 16px;
	font-size: 12px;
	color: var(--text-secondary, #374151);
}

.transcript-features-list li {
	margin-bottom: 4px;
}

.transcript-feature-text {
	color: var(--text-primary, #111827);
}

.transcript-feature-context {
	color: var(--text-muted, #6b7280);
	font-style: italic;
}

/* ---------------------------------------------------------------------------
   Feature Requests — Levitating section card
   --------------------------------------------------------------------------- */

.transcript-feature-requests { --card-accent: #D97706; }

.transcript-fr-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.transcript-fr-card {
	position: relative;
	padding: 14px;
	/* .transcript-levitate class added via JS for shadow + bevel */
}

.transcript-fr-request {
	font-weight: 500;
	color: var(--text-primary, #111827);
	margin-bottom: 4px;
}

.transcript-fr-context {
	font-size: 12px;
	color: var(--text-muted, #6b7280);
	margin-bottom: 8px;
}

/* Quote blocks — unified blue left-border */
.transcript-fr-quote {
	padding: 10px 12px;
	background: color-mix(in srgb, #3B82F6 4%, transparent);
	border-radius: 0 8px 8px 0;
	border-left: 3px solid #3B82F6;
}

.transcript-fr-quote-text {
	font-size: 13px;
	font-style: italic;
	color: var(--text-secondary, #374151);
	line-height: 1.5;
}

.transcript-fr-quote-meta {
	font-size: 11px;
	color: var(--text-muted, #6b7280);
	margin-top: 6px;
}

.transcript-fr-period-badge {
	position: absolute;
	top: 12px;
	right: 12px;
}

/* ---------------------------------------------------------------------------
   Detailed Quotes — Unified blue left-border
   --------------------------------------------------------------------------- */

.transcript-detailed-quote {
	margin-top: 12px;
	padding: 12px 16px;
	background: color-mix(in srgb, #3B82F6 4%, transparent);
	border-radius: 0 8px 8px 0;
	border-left: 3px solid #3B82F6;
	transition: background 0.15s ease;
}

.transcript-detailed-quote:hover {
	background: color-mix(in srgb, #3B82F6 8%, transparent);
}

.transcript-detailed-quote-text {
	font-size: 13px;
	font-style: italic;
	color: var(--text-secondary, #374151);
	line-height: 1.5;
	margin-bottom: 8px;
}

.transcript-detailed-quote-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
	font-size: 12px;
}

.transcript-detailed-quote-left {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-muted, #6b7280);
}

/* ---------------------------------------------------------------------------
   Insight Points
   --------------------------------------------------------------------------- */

.transcript-insight-points {
	margin: 8px 0 0 0;
	padding-left: 16px;
	font-size: 13px;
	color: var(--text-secondary, #374151);
}

.transcript-insight-points li {
	margin-bottom: 4px;
}

/* ---------------------------------------------------------------------------
   Interactive Controls
   --------------------------------------------------------------------------- */

.transcript-show-calls-btn {
	cursor: pointer;
	background: var(--bg-hover, #f3f4f6);
	border: 1px solid var(--border-subtle, #e5e7eb);
	color: var(--text-secondary, #374151);
	transition: all 0.15s ease;
}

.transcript-show-calls-btn:hover {
	background: var(--bg-accent-subtle, rgba(59, 130, 246, 0.08));
	border-color: var(--accent-primary, #3b82f6);
}

.btn-copy-quote {
	font-size: 11px;
	color: var(--text-muted, #9ca3af);
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	transition: all 0.15s ease;
}

.btn-copy-quote:hover {
	color: var(--accent-primary, #3b82f6);
	background: var(--bg-hover, #f3f4f6);
}

.export-loading {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   Micro-interactions & Delight
   --------------------------------------------------------------------------- */

/* At a Glance cards: staggered entrance */
@keyframes transcriptCardEntrance {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.transcript-summaries-grid > * {
	animation: transcriptCardEntrance 0.3s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.transcript-summaries-grid > *:nth-child(2) {
	animation-delay: 0.06s;
}

.transcript-summaries-grid > *:nth-child(3) {
	animation-delay: 0.12s;
}

.transcript-summaries-grid > *:nth-child(4) {
	animation-delay: 0.18s;
}

/* Section cards: subtle entrance */
.transcript-section-card {
	animation: transcriptCardEntrance 0.35s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* Copy button: satisfying press */
.btn-copy-quote:active {
	transform: scale(0.95);
	transition: transform 0.1s ease;
}

/* ---------------------------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.transcript-levitate,
	.transcript-section-card,
	.transcript-show-more-btn,
	.transcript-detailed-quote,
	.transcript-show-calls-btn,
	.btn-copy-quote,
	.btn-copy-quote:active,
	.details-chevron,
	.transcript-summaries-grid > * {
		transition: none !important;
		transform: none !important;
		animation: none !important;
	}

	.transcript-levitate:hover,
	.transcript-section-card:hover {
		transform: none;
	}
}
