/* SCOTUS Analytics — Transcript Player Styles (extracted from monolithic player) */
/* Note: reset and body rules removed — handled by base.css */

.player-header {
  position: sticky; top: 59px; z-index: 90; background: #fff;
  border-bottom: 2px solid #e0e0e0; padding: 8px 16px;
}
.header-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-info h1 { font-size: 1.1em; display: inline; margin-right: 8px; }
.docket, .date { font-size: 0.85em; color: #666; margin-right: 8px; }
.legend { display: flex; gap: 4px; flex-wrap: wrap; }
.legend-item {
  font-size: 0.7em; padding: 2px 6px; border-radius: 3px;
  border: 1px solid; white-space: nowrap;
}

/* Audio Player */
.audio-section { margin: 8px 0; }
.audio-controls { display: flex; align-items: center; gap: 8px; }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #333;
  background: #fff; cursor: pointer; font-size: 14px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.play-btn:hover { background: #f0f0f0; }
.play-btn.playing { background: #333; color: #fff; }
.progress-container {
  flex: 1; height: 6px; background: #e0e0e0; border-radius: 3px;
  cursor: pointer; position: relative;
}
.progress-bar {
  height: 100%; background: #333; border-radius: 3px; width: 0%;
  transition: width 0.1s linear;
}
.time-display { font-size: 0.8em; color: #666; white-space: nowrap; min-width: 100px; }
.speed-controls { display: flex; gap: 2px; }
.speed-btn {
  font-size: 0.7em; padding: 2px 6px; border: 1px solid #ccc;
  background: #fff; cursor: pointer; border-radius: 3px;
}
.speed-btn.active { background: #333; color: #fff; border-color: #333; }

/* Filter Bar */
.filter-bar {
  display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap;
}
.filter-bar select {
  font-size: 0.8em; padding: 3px 6px; border: 1px solid #ccc; border-radius: 3px;
}
.toggle-label { font-size: 0.8em; color: #666; cursor: pointer; white-space: nowrap; }
.toggle-label input { margin-right: 3px; }

/* Summary Panel */
.summary-panel { background: #fff; border-bottom: 1px solid #e0e0e0; }
.toggle-summary-btn {
  width: 100%; padding: 8px; border: none; background: linear-gradient(135deg, #4a6fa5, #5b8cc2);
  cursor: pointer; font-size: 0.9em; color: #fff; font-weight: 700;
  letter-spacing: 0.5px; border-radius: 4px 4px 0 0;
}
.summary-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
.summary-card {
  flex: 1; min-width: 140px; max-width: 180px; padding: 8px;
  border: 1px solid #e0e0e0; border-radius: 6px; background: #fff;
}
.card-name { font-weight: 700; font-size: 0.9em; }
.card-stats { font-size: 0.75em; color: #888; }
.card-top-sentiment { margin-top: 4px; }
.mini-badge { font-size: 0.7em; padding: 1px 4px; border-radius: 2px; border: 1px solid; }
.card-disposition { font-size: 0.75em; margin-top: 2px; }
.lean-pet { color: #1565c0; }
.lean-resp { color: #c62828; }
.lean-neutral { color: #666; }

/* Transcript */
.player-page main { padding: 12px 16px 80px; max-width: 900px; margin: 0 auto; }
.utterance {
  padding: 10px 12px; margin-bottom: 4px; border-radius: 4px;
  border-left: 4px solid transparent; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.utterance:hover { background: #f0f0f0; }
.utterance.active {
  background: #e3f2fd !important; box-shadow: 0 0 0 2px #1976d2;
}
.utterance.advocate { opacity: 0.75; padding-left: 24px; border-left-color: #e0e0e0; }
.utterance.advocate .speaker-name { color: #888; }
.utterance.justice { border-left-color: #bdbdbd; }
.utterance.analyzed { border-left-width: 5px; }
.utterance.hidden { display: none; }

.utterance-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.speaker-name { font-weight: 700; font-size: 0.85em; }
.page-ref { font-size: 0.7em; color: #999; }
.side-badge {
  font-size: 0.7em; padding: 1px 4px; border-radius: 2px;
  background: #f5f5f5; color: #666;
}
.side-badge.pet { background: #e3f2fd; color: #1565c0; }
.side-badge.resp { background: #fce4ec; color: #c62828; }
.sentiment-badge {
  font-size: 0.7em; padding: 2px 6px; border-radius: 3px;
  font-weight: 600; white-space: nowrap;
}
.interrupt-marker { color: #e65100; font-weight: 700; font-size: 0.85em; }

.utterance-text { font-size: 0.9em; line-height: 1.5; }

.sentiment-bar {
  display: flex; height: 4px; border-radius: 2px; overflow: hidden;
  margin-top: 6px;
}
.bar-segment { height: 100%; }

.justification {
  font-size: 0.78em; color: #666; font-style: italic; margin-top: 4px;
  display: none;  /* Hidden by default, toggled via JS */
}
.justification.visible { display: block; }

/* Summary Sections */
.summary-section { margin-bottom: 16px; }
.section-heading {
  font-size: 0.95em; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.method-tag {
  font-size: 0.72em; font-weight: 400; color: #888;
  background: #f0f0f0; padding: 2px 6px; border-radius: 3px;
}
.section-desc { font-size: 0.8em; color: #666; margin-bottom: 8px; }

/* ELP Section */
.elp-headline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.elp-prediction { font-size: 1em; font-weight: 700; }
.elp-closeness { font-size: 0.8em; color: #888; text-transform: capitalize; }
.elp-bar-container { margin-bottom: 12px; }
.elp-bar-label { font-size: 0.75em; color: #666; }
.elp-question-bar {
  display: flex; height: 20px; border-radius: 4px; overflow: hidden;
  margin: 4px 0; border: 1px solid #e0e0e0;
}
.elp-question-bar .elp-bar-pet { background: #1976d2; }
.elp-question-bar .elp-bar-resp { background: #c62828; }
.elp-mini-bar {
  display: flex; height: 16px; border-radius: 3px; overflow: hidden;
  margin: 4px 0; font-size: 0.7em; color: #fff; font-weight: 600;
  text-align: center; line-height: 16px;
}
.elp-mini-bar .elp-bar-pet { background: #42a5f5; min-width: 18px; }
.elp-mini-bar .elp-bar-resp { background: #ef5350; min-width: 18px; }

/* Methodology Comparison */
.concordance-badge {
  display: inline-block; font-size: 0.85em; font-weight: 700;
  background: #e8f5e9; color: #2e7d32; padding: 4px 10px;
  border-radius: 4px; margin-bottom: 8px;
}
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.82em; margin: 8px 0;
}
.comparison-table th {
  text-align: left; padding: 6px 8px; border-bottom: 2px solid #e0e0e0;
  font-weight: 600; font-size: 0.9em; color: #555;
}
.comparison-table td { padding: 5px 8px; border-bottom: 1px solid #f0f0f0; }
.comp-justice { font-weight: 600; }
.comp-match { text-align: center; }
.match-yes { color: #2e7d32; font-weight: 700; font-size: 1.1em; }
.match-no { color: #c62828; font-weight: 700; font-size: 1.1em; }
.match-uncertain { color: #888; }
.comparison-note { font-size: 0.75em; color: #888; font-style: italic; margin-top: 4px; }

/* Chat Panel */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1976d2; color: #fff; border: none; cursor: pointer;
  font-size: 24px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
}
.chat-fab:hover { background: #1565c0; transform: scale(1.05); }
.chat-fab.open { background: #555; }

.chat-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 199;
  width: 420px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 100px);
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }

.chat-header {
  background: #1976d2; color: #fff; padding: 12px 16px;
  font-size: 0.95em; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-header-title { display: flex; align-items: center; gap: 8px; }
.chat-close {
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; padding: 0 4px; opacity: 0.8;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.chat-welcome {
  text-align: center; padding: 16px 8px; color: #666;
}
.chat-welcome h3 { font-size: 1em; color: #333; margin-bottom: 8px; }
.chat-welcome p { font-size: 0.85em; margin-bottom: 12px; }

.chat-suggestions { display: flex; flex-direction: column; gap: 6px; }
.chat-suggestion {
  background: #f0f7ff; border: 1px solid #bbdefb; border-radius: 8px;
  padding: 8px 12px; font-size: 0.82em; color: #1565c0;
  cursor: pointer; text-align: left; transition: background 0.15s;
}
.chat-suggestion:hover { background: #e3f2fd; }

.chat-msg {
  max-width: 88%; font-size: 0.88em; line-height: 1.5;
  padding: 10px 14px; border-radius: 12px; word-wrap: break-word;
}
.chat-msg.user {
  align-self: flex-end; background: #1976d2; color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start; background: #f5f5f5; color: #333;
  border-bottom-left-radius: 4px;
}
.chat-msg.assistant p { margin: 0 0 8px 0; }
.chat-msg.assistant p:last-child { margin-bottom: 0; }
.chat-msg.assistant strong { font-weight: 700; }
.chat-msg.assistant em { font-style: italic; }
.chat-msg.assistant ul, .chat-msg.assistant ol { margin: 4px 0 8px 20px; }
.chat-msg.assistant li { margin-bottom: 2px; }
.chat-msg.assistant blockquote {
  border-left: 3px solid #ccc; margin: 4px 0; padding: 4px 8px;
  color: #555; font-style: italic;
}
.chat-msg.error {
  align-self: center; background: #fce4ec; color: #c62828;
  font-size: 0.82em; border-radius: 8px;
}
.chat-typing {
  align-self: flex-start; background: #f5f5f5; color: #999;
  padding: 10px 14px; border-radius: 12px; font-size: 0.85em;
  border-bottom-left-radius: 4px;
}
.chat-typing .dots { display: inline-block; }
.chat-typing .dots span {
  animation: blink 1.4s infinite; opacity: 0.3; font-size: 1.2em;
}
.chat-typing .dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 1; } }

.chat-input-area {
  border-top: 1px solid #e0e0e0; padding: 10px 12px;
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
  flex: 1; border: 1px solid #ccc; border-radius: 8px;
  padding: 8px 12px; font-size: 0.88em; resize: none;
  max-height: 80px; line-height: 1.4; font-family: inherit; outline: none;
}
.chat-input:focus { border-color: #1976d2; }
.chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: #1976d2; color: #fff; border: none; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send:hover { background: #1565c0; }
.chat-send:disabled { background: #ccc; cursor: not-allowed; }

@media print {
  header { position: static; }
  .audio-section, .filter-bar, .toggle-summary-btn { display: none; }
  .justification { display: block; }
  .chat-fab, .chat-panel { display: none; }
}

