/* Songs and creative activities made visible: the Materials shortcuts, the songs page
   and each block's conversation. */

.resource-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.resource-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.resource-shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.resource-shortcut:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 3px; }

.resource-shortcut-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--brand-navy);
}

.resource-shortcut.is-songs .resource-shortcut-icon { background: var(--brand-yellow); }
.resource-shortcut.is-creative .resource-shortcut-icon { background: #88ed73; }

.resource-shortcut-text { display: grid; gap: 2px; }
.resource-shortcut-text strong { color: var(--brand-navy); font-size: 1.05rem; }
.resource-shortcut-text small { color: var(--muted); font-weight: 700; }
.resource-shortcut-go { color: var(--brand-cyan-strong); }

/* Songs page */
.songs-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.songs-jump button {
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--brand-navy);
  font-weight: 900;
}

.songs-jump small { color: var(--muted); font-weight: 700; }

.songs-jump p {
  flex-basis: 100%;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.songs-jump p:first-child { margin-top: 0; }

.songs-part { margin-top: 28px; }
.songs-part > h2 { margin: 0 0 4px; color: var(--brand-navy); font-size: 1.5rem; }
.songs-part-intro { max-width: 70ch; margin: 0 0 16px; color: var(--muted); }

.songs-level { margin-bottom: 22px; scroll-margin-top: 16px; }

.songs-level-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.songs-level h3 { margin: 0; color: var(--brand-navy); font-size: 1.2rem; }
.songs-level h3 small { color: var(--muted); font-size: 0.85rem; }
.songs-level-link { color: var(--brand-cyan-strong); font-weight: 800; }

.song-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.song-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 14px;
  background: var(--surface);
}

.song-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-cyan-soft);
  color: var(--brand-navy);
  font-weight: 900;
}

.song-text { display: grid; gap: 2px; }
.song-text strong { color: var(--brand-navy); }
.song-text small { color: var(--muted); }
.song-row audio { width: 100%; height: 36px; }

.song-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-cyan-strong);
  font-weight: 800;
  white-space: nowrap;
}

.song-open .ui-icon { width: 16px; height: 16px; }

/* YouTube songs: cards, the block strip and the player */
.song-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.song-video {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--surface);
}

.song-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: var(--surface-soft);
  cursor: pointer;
}

.song-video-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.song-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 16, 111, 0.82);
  color: #fff;
  font-size: 16px;
  transform: translate(-50%, -50%);
}

.song-video-thumb:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }

.song-video-text h4 { margin: 0 0 2px; color: var(--brand-navy); font-size: 0.98rem; line-height: 1.3; }
.song-video-text p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.song-video-blocks a { color: var(--brand-cyan-strong); font-weight: 800; }

.song-video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.song-video-external { color: var(--brand-cyan-strong); font-size: 0.85rem; font-weight: 800; }

/* On a block page the songs sit above the classes, so each one is a single short row. */
.song-video-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.is-compact .song-video {
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  padding: 8px;
}

.is-compact .song-video-thumb { grid-row: 1 / span 2; }
.is-compact .song-video-play { width: 32px; height: 32px; font-size: 12px; }
.is-compact .song-video-text p { display: none; }
.is-compact .song-video-actions { justify-content: flex-start; gap: 14px; }
.is-compact .song-video-actions .button { min-height: 0; padding: 6px 12px; font-size: 0.85rem; }

.block-song-videos { margin: 0 0 18px; }
.block-song-videos h2 { margin: 0 0 10px; color: var(--brand-navy); font-size: 1.1rem; }
.block-song-videos h2 small { color: var(--muted); font-size: 0.85rem; }

.song-video-dialog {
  width: min(960px, calc(100vw - 32px));
  border: 0;
  border-radius: 22px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(22, 12, 53, 0.4);
}

.song-video-dialog::backdrop { background: rgba(22, 12, 53, 0.75); }

.song-video-dialog header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 10px;
}

.song-video-dialog h2 { flex: 1; margin: 0; color: var(--brand-navy); font-size: 1.15rem; }

.song-video-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-navy);
  font-size: 22px;
  cursor: pointer;
}

.song-video-frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.song-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* A block's conversation, above its classes */
.block-conversations {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.block-conversation {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(200px, 280px) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 16px 12px 12px;
  background: var(--surface-soft);
}

.block-conversation img {
  width: 120px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.block-conversation .eyebrow { margin: 0; }
.block-conversation h2 { margin: 2px 0; color: var(--brand-navy); font-size: 1.1rem; }
.block-conversation-text > p:last-child { margin: 0; color: var(--muted); }
.block-conversation audio { width: 100%; height: 36px; }

@media (max-width: 940px) {
  .song-row { grid-template-columns: auto minmax(0, 1fr); }
  .song-row audio,
  .song-row .song-open { grid-column: 1 / -1; }
  .block-conversation { grid-template-columns: 96px minmax(0, 1fr); }
  .block-conversation img { width: 96px; }
  .block-conversation audio,
  .block-conversation .button { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .block-conversation { grid-template-columns: minmax(0, 1fr); }
  .block-conversation img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .resource-shortcut { transition: none; }
  .resource-shortcut:hover { transform: none; }
}
