/* Dark theme palette - same exact values as wombat-converts'/wombat-narrates' style.css, so this
   app feels like the same product family, not a separate one. */
:root {
  --bg-main: #111315;
  --bg-accent: #2b3138;
  --bg-accent-active: #3a4149;
  --fg-main: #f3f4f6;
  --fg-muted: #aeb6bf;
  --fg-status-speaking: #9fc6ff;
  --fg-status-error: #ff9b9b;
  --grade-a: #5fd97a;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-main);
  color: var(--fg-main);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
}

.banner {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: auto;
}

.view {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

#view-app {
  max-width: 900px;
}

.view[hidden] {
  display: none;
}

h1 {
  font-size: 1.6rem;
  margin: 0.2em 0;
}

.wombat-tagline {
  margin: 0 0 0.35rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.15rem;
  margin-top: 0;
}

.muted {
  color: var(--fg-muted);
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 16px;
}

.signed-in-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.card {
  background: var(--bg-accent);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.field input[type="text"],
.field input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-main);
  color: var(--fg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 6px;
  font-size: 1rem;
}

button {
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--fg-status-speaking);
  color: var(--bg-main);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
}

.btn-primary:disabled {
  background: var(--bg-accent-active);
  color: var(--fg-muted);
  opacity: 1;
  cursor: not-allowed;
}

.login-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-secondary {
  background: transparent;
  color: var(--fg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
}

.btn-link {
  background: none;
  border: none;
  color: var(--fg-status-speaking);
  font-weight: bold;
  font-size: 1.05rem;
  padding: 0;
}

.status {
  font-weight: bold;
}

.log {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--fg-muted);
  white-space: pre-wrap;
  margin-top: 8px;
}

#result-area {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-accent-active);
}

#result-area h3 {
  margin: 0 0 4px;
}

#transcript-preview {
  background: var(--bg-main);
  border: 1px solid var(--bg-accent-active);
  border-radius: 6px;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 0.92rem;
  margin-top: 10px;
}

#download-area a {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--grade-a);
}

.help-section {
  margin-bottom: 18px;
}

.help-heading {
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.help-section p {
  color: var(--fg-muted);
  margin: 0;
}

.attribution {
  color: var(--fg-muted);
  font-style: italic;
  font-size: 0.8rem;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  border-bottom: 1px solid var(--bg-accent-active);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-weight: bold;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--fg-main);
  border-bottom-color: var(--fg-status-speaking);
}

.tab-link {
  color: var(--fg-muted);
  font-weight: bold;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.tab-link:hover {
  color: var(--fg-main);
}

.panel[hidden] {
  display: none;
}

.library-table-wrap {
  overflow-x: auto;
}

.library-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.library-table th,
.library-table td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--bg-accent-active);
  vertical-align: middle;
}

.library-table th {
  color: var(--fg-muted);
  white-space: nowrap;
}

.library-actions {
  white-space: nowrap;
}

.library-action {
  padding: 5px 8px;
  margin: 2px;
  font-size: 0.82rem;
}

.library-source-link {
  color: var(--fg-main);
  text-decoration: none;
}

.library-source-link:hover,
.library-source-link:focus-visible {
  color: var(--fg-status-speaking);
}

.library-metadata-link {
  color: var(--fg-main);
  text-decoration: none;
}

.library-metadata-link:hover,
.library-metadata-link:focus-visible {
  color: var(--fg-status-speaking);
}
