/*
 * ClubCast overlay styles.
 *
 * Every selector is `cc_`-prefixed and nothing here restyles an upstream
 * element. AudioMass sets bare `body`, `html`, `button` and `a` rules, so the
 * one place we have to interact with it is the body offset for our fixed bar —
 * done via a class we add, not by editing its rules.
 */

:root {
  --cc-bar-h: 44px;
  --cc-bg: #10161c;
  --cc-bg-raised: #182028;
  --cc-border: #26313c;
  --cc-text: #e8eef4;
  --cc-muted: #93a3b1;
  --cc-accent: #35d0ba;
  --cc-accent-ink: #05231f;
  --cc-danger: #ff6b6b;
}

.cc_bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--cc-bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: var(--cc-bg);
  border-bottom: 1px solid var(--cc-border);
  color: var(--cc-text);
  font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 2147483000; /* above AudioMass's own modals */
  box-sizing: border-box;
}

/* AudioMass lays itself out from the top of the viewport, so shift the whole
   page down by the bar height instead of overlapping its toolbar. */
body.cc_has_bar { padding-top: var(--cc-bar-h); box-sizing: border-box; }

.cc_bar_left, .cc_bar_right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc_logo { font-weight: 600; letter-spacing: 0.2px; white-space: nowrap; }
.cc_episode {
  color: var(--cc-muted);
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc_episode::before { content: "· "; }
.cc_guest { color: var(--cc-muted); }
.cc_guest::before { content: "· "; }

.cc_btn {
  font: inherit;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.cc_btn_primary { background: var(--cc-accent); color: #05231f; border-color: var(--cc-accent); font-weight: 600; }
.cc_btn_primary:hover { filter: brightness(1.08); }
.cc_btn_primary:disabled { opacity: 0.45; cursor: default; filter: none; }
.cc_btn_ghost { background: transparent; color: var(--cc-muted); border-color: var(--cc-border); }
.cc_btn_ghost:hover { color: var(--cc-text); border-color: var(--cc-muted); }

.cc_notice {
  position: fixed;
  top: var(--cc-bar-h);
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 14px;
  background: #1d2731;
  border-bottom: 1px solid var(--cc-border);
  color: var(--cc-muted);
  font: 12.5px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 2147482999;
  box-sizing: border-box;
}
.cc_notice_x {
  background: none;
  border: 0;
  color: var(--cc-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.cc_overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483100;
  padding: 20px;
}
.cc_modal {
  background: var(--cc-bg-raised);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  color: var(--cc-text);
  font: 13.5px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.cc_modal_title {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--cc-border);
}
.cc_modal_body { padding: 16px 20px; }
.cc_modal_body p { margin: 0 0 10px; }
.cc_modal_footer {
  padding: 12px 20px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cc_speclist { margin: 0 0 12px; padding-left: 18px; }
.cc_speclist li { margin: 0 0 6px; }
.cc_muted { color: var(--cc-muted); }

.cc_detected {
  border-top: 1px solid var(--cc-border);
  padding-top: 12px;
  color: var(--cc-muted);
  font-size: 12.5px;
}
.cc_detected_title { color: var(--cc-text); font-weight: 600; margin-bottom: 6px; }
.cc_detected div { margin-bottom: 3px; }

.cc_progress_label { margin-bottom: 10px; color: var(--cc-muted); }
.cc_progress {
  height: 8px;
  border-radius: 4px;
  background: #0c1116;
  overflow: hidden;
  border: 1px solid var(--cc-border);
}
.cc_progress_fill {
  height: 100%;
  width: 0%;
  background: var(--cc-accent);
  transition: width 0.25s ease;
}

@media (max-width: 720px) {
  .cc_episode { max-width: 30vw; }
  .cc_btn_ghost { display: none; }
}
