/* Base styles */
body {
  font-family: system-ui, sans-serif;
  margin: 2rem;
  background: #fdfdfd;
  color: #222;
  transition: background 0.3s, color 0.3s;
}

h1 {
  margin-bottom: 1rem;
}

.row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 6px;
  background: #f7f7f7;
  transition: background 0.3s;
}

.meta {
  font-size: 0.9rem;
  color: #666;
}

audio {
  width: 100%;
}

pre {
  background: #eee;
  padding: .5rem;
  white-space: pre-wrap;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Dark mode overrides */
body.dark {
  background: #121212;
  color: #e0e0e0;
}

body.dark .row {
  background: #1e1e1e;
}

body.dark pre {
  background: #2a2a2a;
}

body.dark .meta {
  color: #aaa;
}

/* Toggle button */
#toggle-dark {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: .5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
}
/* Audio + transcript side by side */
.audio-transcript {
  display: grid;
  grid-template-columns: 300px 1fr; /* audio on left, transcript on right */
  gap: 1rem;
  align-items: start;
}

.audio-transcript audio {
  width: 100%;
}

.audio-transcript .transcript {
  max-height: 200px;       /* scroll if long */
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  background: #f7f7f7;
  padding: .5rem;
  border-radius: 4px;
}

body.dark .audio-transcript .transcript {
  background: #1e1e1e;
}
/* Responsive: stack on narrow screens */
@media (max-width: 700px) {
  .audio-transcript {
    grid-template-columns: 1fr; /* single column */
  }
  .audio-transcript .transcript {
    max-height: none; /* let transcript expand naturally */
  }
}
.timecode {
  color: #888;          /* gray */
  font-family: monospace;
  margin-right: 0.5em;  /* spacing */
}
#searchInput {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  font-size: 14px;
}
#searchResults div {
  margin: 5px 0;
  padding: 5px;
  border-bottom: 1px solid #ccc;
}
.text-center {
    text-align: center;
}
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}
.text-gray-400 {
    --tw-text-opacity: 1;
    color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}

.archive-entry {
  display: flex;
  border-bottom: 1px solid #ccc;
  padding: 0.75em 0;
}

.entry-left {
  width: 200px; /* fixed column for play + metadata */
  flex-shrink: 0;
  text-align: center;
  padding-right: 1em;
  border-right: 1px solid #eee;
}

.play-btn {
  display: block;
  margin: 0 auto 0.5em auto;
  padding: 0.5em 1em;
  font-size: 1em;
  background: #007acc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.play-btn:hover {
  background: #005fa3;
}
.metadata {
  font-size: 0.8em;
  color: #666;
  line-height: 1.4;
}

.entry-right {
  flex-grow: 1;
  padding-left: 1em;
}

.cue {
  cursor: pointer;
  margin: 0.25em 0;
  padding: 0.25em;
  border-radius: 3px;
}

.cue:hover {
  background: #f0f0f0;
}
.cue.active {
  background: rgba(255, 215, 0, 0.3);
}
#player-bar {
  position: sticky;   /* stays at top when scrolling */
  top: 55px;
  z-index: 1000;
  background: #f9f9f9;
  border-bottom: 1px solid #ccc;
  padding: 0.5em;
  display: flex;
  align-items: center;
  gap: 1em;
}

#player {
  flex-shrink: 0;
}

#active-file {
  font-size: 0.9em;
  color: #333;
  font-weight: bold;
}
