/**
 * TodayCast Player - Production WordPress Stylesheet
 * Scoped styles for high-fidelity audio, video, and radio widgets
 */

.todaycast-card {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  width: 100%;
  max-width: 380px;
  margin: 2rem auto;
  border-radius: 1.25rem;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  transition: all 0.3s ease;
  user-select: none;
}

/* Reference Light Theme (Matches reference image) */
.todaycast-theme-reference_light {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
  color: #111827;
}

/* Today Sunrise Theme */
.todaycast-theme-today_sunrise {
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 20px 45px rgba(242, 104, 41, 0.12);
  color: #111827;
}

/* Studio Midnight Theme */
.todaycast-theme-midnight_broadcast {
  background: #171717;
  border: 1px solid #262626;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
}

/* Full-bleed artwork fills the entire top edge of the player */
.todaycast-cover-wrap {
  display: block;
  width: 100%;
  margin: 0 0 1.35rem;
  padding: 0;
}

.todaycast-cover {
  width: 100%;
  height: clamp(210px, 62vw, 285px);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 0;
  background: #e5e5e5;
}

.todaycast-card-content {
  padding: 0 1.4rem 1.25rem;
}

.todaycast-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Serif Headings */
.todaycast-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  line-height: 1.25;
}

.todaycast-artist {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
  margin: 0.35rem 0 0;
  color: #4b5563;
}

.todaycast-theme-midnight_broadcast .todaycast-artist {
  color: #a3a3a3;
}

/* Progress Scrubber */
.todaycast-progress-container {
  margin: 1.5rem 0 0.75rem;
}

.todaycast-progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.todaycast-progress-fill {
  height: 100%;
  width: 0%;
  background: #111827;
  transition: width 0.1s linear;
}

.todaycast-theme-today_sunrise .todaycast-progress-fill {
  background: #f26829;
}

.todaycast-theme-midnight_broadcast .todaycast-progress-fill {
  background: #f5f5f5;
}

.todaycast-timestamps {
  display: flex;
  justify-content: space-between;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
  color: #1f2937;
}

.todaycast-theme-midnight_broadcast .todaycast-timestamps {
  color: #d4d4d4;
}

/* Main Controls */
.todaycast-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.todaycast-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all 0.2s ease;
}

.todaycast-btn:hover {
  color: #111827;
}

.todaycast-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.2s;
}

.todaycast-play-btn:hover {
  transform: scale(1.05);
  background: #1f2937;
  color: #ffffff;
}

.todaycast-play-btn:active {
  transform: scale(0.95);
}

.todaycast-theme-today_sunrise .todaycast-play-btn {
  background: #f26829;
}

.todaycast-theme-midnight_broadcast .todaycast-play-btn {
  background: #ffffff;
  color: #111827;
}

/* Utility Bottom Bar */
.todaycast-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  justify-content: flex-end;
}

.todaycast-theme-midnight_broadcast .todaycast-utility-bar {
  border-top-color: #262626;
}

.todaycast-download-btn {
  color: #4b5563;
  padding: 0.5rem;
  cursor: pointer;
  position: relative;
  border: none;
  background: none;
}

.todaycast-download-btn:hover {
  color: #000000;
}

.todaycast-locked-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

.todaycast-toast {
  position: absolute;
  right: 0;
  bottom: 2.5rem;
  background: #111827;
  color: #ffffff;
  font-size: 0.6875rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  z-index: 50;
}

/* Downloads are intentionally hidden in the public player UI. */
.todaycast-download-btn { display: none !important; }

@media (max-width: 480px) {
  .todaycast-card { max-width: 100%; margin: 1rem auto; border-radius: 1rem; }
  .todaycast-cover { height: clamp(190px, 68vw, 260px); }
  .todaycast-card-content { padding: 0 1rem 1rem; }
}


/* Player and lyrics: equal-level, equal-width cards on one shared row. */
.todaycast-player-lyrics-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1rem, 2.5vw, 2rem);
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto;
}
.todaycast-player-lyrics-layout > .todaycast-card,
.todaycast-player-lyrics-layout > .todaycast-lyrics-quote {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
}
.todaycast-player-lyrics-layout > .todaycast-card {
  align-self: stretch;
}
.todaycast-player-lyrics-layout > .todaycast-lyrics-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-left: 4px solid #c59a50;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-style: normal;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: normal;
}
.todaycast-quote-mark {
  display: block;
  color: #c59a50;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: .8;
  margin-bottom: 1rem;
}
.todaycast-lyrics-text { white-space: normal; }
.todaycast-player-lyrics-layout:has(.todaycast-theme-today_sunrise) > .todaycast-lyrics-quote {
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border-color: rgba(245, 158, 11, 0.3);
  border-left: 4px solid #c59a50;
  box-shadow: 0 20px 45px rgba(242, 104, 41, 0.12);
}
.todaycast-player-lyrics-layout:has(.todaycast-theme-midnight_broadcast) > .todaycast-lyrics-quote {
  background: #171717;
  border-color: #262626;
  border-left: 4px solid #c59a50;
  color: #f5f5f5;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}
@media (max-width: 700px) {
  .todaycast-player-lyrics-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding: 0 .75rem;
  }
  .todaycast-player-lyrics-layout > .todaycast-card,
  .todaycast-player-lyrics-layout > .todaycast-lyrics-quote {
    max-width: 100%;
    min-height: 0;
  }
  .todaycast-player-lyrics-layout > .todaycast-lyrics-quote { padding: 1.4rem 1.25rem; }
}

/* Professional, balanced player + lyrics presentation */
.todaycast-player-lyrics-layout {
  --todaycast-accent: #b88a42;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1.1rem, 2.5vw, 2rem);
  width: 100%;
  max-width: 1120px;
  margin: 2rem auto;
}
.todaycast-player-lyrics-layout > .todaycast-card,
.todaycast-player-lyrics-layout > .todaycast-lyrics-quote {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid #e6e8ec;
  border-radius: 20px;
  background: #fff;
  color: #202633;
  box-shadow: 0 14px 38px rgba(24, 32, 48, .08), 0 2px 7px rgba(24, 32, 48, .035);
  overflow: hidden;
}
.todaycast-player-lyrics-layout > .todaycast-card {
  display: flex;
  flex-direction: column;
}
.todaycast-player-lyrics-layout .todaycast-cover-wrap { margin: 0 0 1.25rem; }
.todaycast-player-lyrics-layout .todaycast-cover { height: clamp(220px, 27vw, 340px); }
.todaycast-player-lyrics-layout .todaycast-card-content { padding: 0 clamp(1rem, 2.2vw, 1.8rem) 1.35rem; }
.todaycast-player-lyrics-layout .todaycast-title { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: clamp(1.15rem, 1.7vw, 1.5rem); letter-spacing: -.035em; }
.todaycast-player-lyrics-layout .todaycast-artist { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: .9rem; color: #717989; }
.todaycast-player-lyrics-layout .todaycast-lyrics-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
  border-top: 3px solid var(--todaycast-accent);
}
.todaycast-player-lyrics-layout .todaycast-quote-mark {
  display: block;
  margin: 0 0 .75rem;
  color: var(--todaycast-accent);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 6vw, 6rem);
  line-height: .65;
  opacity: .9;
}
.todaycast-player-lyrics-layout .todaycast-lyrics-text {
  color: #333b49;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 400;
  line-height: 1.95;
  white-space: normal;
  overflow-wrap: anywhere;
}
.todaycast-player-lyrics-layout .todaycast-lyrics-text::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 1.5rem;
  background: var(--todaycast-accent);
  opacity: .75;
}
.todaycast-player-lyrics-layout .todaycast-theme-today_sunrise + .todaycast-lyrics-quote { --todaycast-accent: #d97736; background: linear-gradient(145deg, #fff 0%, #fff9f1 100%); }
.todaycast-player-lyrics-layout .todaycast-theme-midnight_broadcast + .todaycast-lyrics-quote { --todaycast-accent: #d6b16c; background: #171b23; border-color: #303744; color: #f4f5f7; }
.todaycast-player-lyrics-layout .todaycast-theme-midnight_broadcast + .todaycast-lyrics-quote .todaycast-lyrics-text { color: #e2e6ed; }
.todaycast-card .todaycast-play-btn:focus-visible,
.todaycast-card .todaycast-btn:focus-visible,
.todaycast-progress-bar:focus-visible { outline: 3px solid #b88a42; outline-offset: 4px; }
.todaycast-card.is-playing .todaycast-play-btn { box-shadow: 0 0 0 6px rgba(184, 138, 66, .14), 0 8px 22px rgba(20, 24, 32, .18); }
@media (max-width: 700px) {
  .todaycast-player-lyrics-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .todaycast-player-lyrics-layout .todaycast-cover { height: clamp(210px, 68vw, 320px); }
  .todaycast-player-lyrics-layout .todaycast-lyrics-quote { min-height: 240px; }
}

/* Single-track playback feedback and accessible playback errors. */
.todaycast-playback-status {
  margin: .85rem 0 0;
  padding: .7rem .85rem;
  border: 1px solid #e7c5c5;
  border-radius: 10px;
  background: #fff5f5;
  color: #8b2525;
  font: 500 .85rem/1.45 'Plus Jakarta Sans', system-ui, sans-serif;
}
.todaycast-playback-status[hidden] { display: none !important; }
.todaycast-player-lyrics-layout.is-active-track > .todaycast-lyrics-quote {
  box-shadow: inset 0 0 0 1px rgba(184, 138, 66, .22), 0 14px 38px rgba(24, 32, 48, .08);
}


/* TodayCast blue media identity */
.todaycast-track-blue {
  --todaycast-blue: #1769d2;
  --todaycast-blue-deep: #0c3f91;
  --todaycast-blue-soft: #eaf3ff;
}
.todaycast-card.todaycast-track-blue {
  background: linear-gradient(155deg, #ffffff 0%, #f2f7ff 100%);
  border: 1px solid #c8dcfb;
  box-shadow: 0 18px 42px rgba(23, 105, 210, 0.16);
}
.todaycast-track-blue .todaycast-title { color: #123c76; }
.todaycast-track-blue .todaycast-artist { color: #52739d; }
.todaycast-track-blue .todaycast-play-btn {
  background: linear-gradient(145deg, #2584f5, #1256b8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 105, 210, 0.28);
}
.todaycast-track-blue .todaycast-btn { color: #1769d2; }
.todaycast-track-blue .todaycast-progress-bar { background: #d7e7fc; }
.todaycast-track-blue .todaycast-progress-fill { background: linear-gradient(90deg, #65b2ff, #1769d2); }
.todaycast-video-wrap.todaycast-track-blue {
  width: 100%; max-width: 760px; margin: 2rem auto; overflow: hidden;
  border: 1px solid #c8dcfb; border-radius: 20px;
  background: linear-gradient(155deg, #ffffff, #eef5ff);
  box-shadow: 0 18px 42px rgba(23, 105, 210, 0.15);
  color: #123c76;
}
.todaycast-video-heading { padding: 1.1rem 1.35rem .9rem; }
.todaycast-video-eyebrow { color: #1769d2; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.todaycast-video-heading h3 { margin: .3rem 0 0; color: #123c76; font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; }
.todaycast-video-wrap video { display: block; width: 100%; max-height: 520px; background: #071b35; border-radius: 0 0 18px 18px; }
.todaycast-video-lyrics-layout > .todaycast-video-wrap,
.todaycast-video-lyrics-layout > .todaycast-lyrics-quote { min-width: 0; flex: 1 1 0; }
.todaycast-video-lyrics-layout > .todaycast-video-wrap { max-width: none; margin: 0; }
.todaycast-video-lyrics-layout .todaycast-lyrics-quote { border-color: #c8dcfb; background: #f3f8ff; color: #173e70; }
@media (max-width: 760px) {
  .todaycast-video-lyrics-layout { display: flex; flex-direction: column; }
}
