/* ===== Base layout ===== */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #020617; /* plain dark */
  color: #e5e7eb;
  min-height: 100vh;
}

/* Hide any old toggle if still in HTML */
.toggle-container {
  display: none !important;
}

/* ===== Header ===== */

.site-header {
  width: 100%;
  background-color: #7ea253;
}

.site-header .header-inner {
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: 64px;
  position: relative;
  display: flex;
  align-items: center;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header .logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-header .header-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.2;
}

.site-header .site-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  margin: 0 8px 2px;
}

.site-header .site-link a {
  color: #cce8c1;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.95;
}

.site-header .site-link a:hover {
  text-decoration: underline;
  opacity: 1;
}

@media (max-width: 720px) {
  .site-header .header-inner {
    flex-direction: column;
    align-items: center;
    padding: 10px 12px;
    min-height: unset;
  }

  .site-header .header-text {
    position: static;
    transform: none;
    margin-top: 6px;
  }

  .site-header .logo {
    height: 34px;
  }

  .site-header .site-title {
    font-size: 1.15rem;
  }

  .site-header .site-link a {
    font-size: 0.9rem;
  }
}

/* ===== Notes ===== */

.note {
  text-align: center;
  font-style: italic;
  font-size: 12px;
  color: #9ca3af;
  margin: 6px 0 18px 0;
}

/* ===== Transcript container ===== */

.transcript-container {
  padding: 18px 16px 16px 16px;
  border-radius: 0; /* full-width bar look */
  background: #020617;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
  max-width: 100%;
  width: 100%;
  margin: 10px 0 24px 0; /* no side margins, spans entire page */
  color: #e5e7eb;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  border-left: none;
  border-right: none;
}

/* ===== Transcript list ===== */

#transcripts {
  /* no containment tricks */
}

.transcript {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: #0b1220;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  font-size: 1.02em;
  color: #e5e7eb;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
}

.transcript:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
  transform: translateY(-1px);
  border-color: rgba(126, 162, 83, 0.85);
}

#transcripts .transcript:first-child {
  margin-top: 2px;
}

/* ===== Row highlights ===== */

.highlight-red {
  background-color: #7f1d1d !important;
  color: #fee2e2 !important;
  border-color: #b91c1c !important;
}

.highlight-yellow {
  background-color: #78350f !important;
  color: #fef9c3 !important;
  border-color: #d97706 !important;
}

.highlight-orange {
  background-color: #9a3412 !important;
  color: #ffedd5 !important;
  border-color: #ea580c !important;
}

/* ===== Inline keyword chips ===== */

.keyword-red,
.keyword-yellow,
.keyword-orange {
  font-weight: 600;
  padding: 0 3px;
  border-radius: 3px;
}

.keyword-red {
  background-color: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.keyword-yellow {
  background-color: rgba(250, 204, 21, 0.12);
  color: #fef9c3;
}

.keyword-orange {
  background-color: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
}

/* ===== Controls (audio + copy) ===== */

audio#audioPlayer {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
  margin-bottom: 12px;
  width: 60%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: #020617;
}

.copy-icon {
  font-size: 17px;
  margin-left: 14px;
  color: #9ca3af;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
}

.copy-icon:hover {
  color: #e5e7eb;
}

/* ===== Listen button + links ===== */

a.listen-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7ea253, #4d7c0f);
  color: #f9fafb !important;
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 600;
  font-size: 0.9em;
  margin-left: 10px;
  text-decoration: none;
  border: 1px solid rgba(190, 242, 100, 0.5);
  box-shadow: 0 6px 14px rgba(22, 101, 52, 0.75);
}

a.listen-btn:hover {
  filter: brightness(1.05);
}

a {
  color: #a3e635;
  font-weight: 500;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Tooltip ===== */

.tooltip {
  visibility: hidden;
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 110%;
  transform: translateY(-50%);
  width: auto;
  max-width: 140px;
  background-color: #111827;
  color: #f9fafb;
  text-align: left;
  border-radius: 5px;
  padding: 3px 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 11px;
  white-space: nowrap;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent #111827 transparent transparent;
}

/* ===== Mobile ===== */

@media (max-width: 700px) {
  .transcript-container {
    padding: 10px 10px 16px 10px;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    margin: 0 0 24px 0;
    box-shadow: none;
  }

  audio#audioPlayer {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-sizing: border-box;
  }
}
