:root {
  --tgl-lyric-size: 16px;
  --tgl-lyric-leading: 1.8;
  --tgl-read-measure: 68ch;
}

.tgl-single { padding: 0 14px; margin-top: 20px; }
.tgl-article { max-width: 860px; margin: 0 auto; position: relative; }
.tgl-post-title {
  font-size: clamp(22px, 5.5vw, 32px);
  font-weight: 800;
  color: var(--tgl-navy, #002147);
  line-height: 1.25;
  margin: 0 0 6px;
  text-align: center;
}
.tgl-song-subtitle { text-align: center; margin-bottom: 20px !important; }

/* --- 1. BREADCRUMB — compact, never overflows a 320px viewport. ---------- */
.tgl-single .tgl-breadcrumbs {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 8px;
  opacity: 0.8;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  max-width: 100% !important;
}
.tgl-single .tgl-breadcrumbs__list {
  display: inline !important; /* Changed from flex to inline to respect ellipsis on container */
  margin: 0;
  padding: 0;
  list-style: none;
}
.tgl-single .tgl-breadcrumbs__item {
  display: inline !important;
  white-space: nowrap !important;
}
.tgl-single .tgl-breadcrumbs__item:not(:last-child)::after {
  content: "›";
  margin: 0 8px;
  opacity: 0.5;
}

/* --- 2. TITLE + TRANSLITERATION ----------------------------------------- */
.tgl-single .tgl-post-title {
  font-size: clamp(20px, 5.5vw, 28px);
  line-height: 1.2;
  margin: 4px 0 4px;
  overflow-wrap: break-word;
  hyphens: none;
  text-align: center;
}
.tgl-song-subtitle {
  margin: 0 0 12px;
  font-size: clamp(14px, 3.4vw, 16px);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--tgl-muted, #5a6472);
  text-align: center;
}

/* --- 3. META ROW — wrapping chips, never a table. ------------------------ */
.tgl-single .tgl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
}
.tgl-single .tgl-meta > * {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--tgl-line, rgba(0,33,71,.12));
  border-radius: 999px;
  background: var(--tgl-card, #fff);
  text-decoration: none;
  line-height: 1.5;
}

/* --- 4. ACTIONS — Center social share and Copy Link. ------------------- */
.tgl-share-container {
  display: flex;
  justify-content: center;
  margin: 10px 0 16px;
  padding: 0;
}
.tgl-single .tgl-share {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  flex-wrap: wrap;
}
.tgl-single .tgl-share a {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  border: 1px solid var(--tgl-line) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}
.tgl-single .tgl-share a svg { width: 22px; height: 22px; }
.tgl-single .tgl-share a:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Reuse footer data-net styles for the share row */
.tgl-single .tgl-share a[data-net="facebook"] { color: #1877F2 !important; }
.tgl-single .tgl-share a[data-net="instagram"] { color: #E4405F !important; }
.tgl-single .tgl-share a[data-net="telegram"] { color: #229ED9 !important; }
.tgl-single .tgl-share a[data-net="whatsapp"] { color: #25D366 !important; }

/* Copy Link is rendered directly inside .tgl-article (there is no .tgl-single
   ancestor in single.php), so scope this rule to its unique data attribute. */
.tgl-share a[data-net="copy"] {
  color: #0A3A8A !important;
  background: #fff !important;
}
.tgl-share a[data-net="copy"] svg,
.tgl-socials a[data-net="copy"] svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 22px;
  height: 22px;
  color: inherit;
  fill: currentColor !important;
}
.tgl-share a[data-net="copy"] svg path,
.tgl-socials a[data-net="copy"] svg path {
  fill: currentColor !important;
  stroke: none;
}
.tgl-share a[data-net="copy"]:hover,
.tgl-share a[data-net="copy"]:focus,
.tgl-share a[data-net="copy"]:focus-visible {
  background: #0A3A8A !important;
  color: #fff !important;
  outline: 2px solid #F2A900;
  outline-offset: 2px;
}



.tgl-song-actions {
  display: none;
}
.tgl-media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 24px;
  background: var(--tgl-navy, #001B44);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.2s;
  flex: 1 1 200px;
  max-width: 100%;
}
.tgl-media-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,27,68,0.2); opacity: 0.95; }
.tgl-media-btn--youtube { background: #FF0000 !important; color: #fff !important; border: none !important; }
.tgl-media-btn--track,
.tgl-media-btn--yt-track { /* PRACTICE ON TRACK: navy on every viewport */
  background: var(--tgl-navy, #001B44) !important;
  color: #fff !important;
  border: 1px solid var(--tgl-navy, #001B44) !important;
}
.tgl-media-btn--track .tgl-media-btn__icon,
.tgl-media-btn--yt-track .tgl-media-btn__icon,
.tgl-media-btn--track .tgl-media-btn__label,
.tgl-media-btn--yt-track .tgl-media-btn__label { color: #fff !important; }
.tgl-media-btn__icon { font-size: 1.2em; }


.tgl-summary__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

/* --- 5. FEATURED IMAGE POLICY ------------------------------------------ */
.tgl-single .post-thumbnail,
.tgl-single .wp-post-image,
.tgl-single .attachment-post-thumbnail,
.tgl-single figure.tgl-featured,
.tgl-single .tgl-featured-image { display: none !important; }

/* --- 6. LYRICS READING EXPERIENCE --------------------------------------- */
.tgl-lyrics-wrap { margin: 0 0 4px; }
.tgl-single .tgl-content {
  max-width: var(--tgl-read-measure);
  font-size: var(--tgl-lyric-size);
  margin: 0 auto;
}
.tgl-single .tgl-content p,
.tgl-single .tgl-content li,
.tgl-single .tgl-content .lgenx-text {
  font-size: var(--tgl-lyric-size);
  line-height: var(--tgl-lyric-leading);
}
.tgl-single .tgl-content p { margin: 0 0 0.8em; }
.tgl-single .tgl-content h3,
.tgl-single .tgl-content h4 { margin-top: 1.2em; }

/* --- 7. VIDEO — SUPPRESSED ---------------------------------------------- */
.tgl-song-video,
.tgl-song-video__frame,
.tgl-single .tgl-content iframe { display: none !important; }

/* --- 8. SONG SUMMARY CARD ----------------------------------------------- */
/* Styles for tgl_ux_the_song_summary in inc/ux.php */

/* --- 8. SONG SUMMARY CARD ----------------------------------------------- */
.tgl-summary-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tgl-navy, #001B44);
  margin: 20px auto 10px;
  text-align: center;
  position: relative;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.tgl-summary-section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--tgl-gold, #F2A900);
  margin: 4px auto 0;
}

.tgl-summary-download {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.tgl-download-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--tgl-navy, #001B44);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.tgl-download-link:hover {
  background: var(--tgl-gold, #F2A900);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.tgl-download-link svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .tgl-summary-section-title {
    margin: 16px auto 8px !important;
    text-align: center !important;
  }
}

/* --- 10. MOBILE FIRST --------------------------------------------------- */
@media (max-width: 640px) {
  .tgl-single { --tgl-lyric-size: 17px; --tgl-lyric-leading: 1.9; padding-top: 10px; }
  .tgl-single .tgl-article { padding-left: 0; padding-right: 0; }
  .tgl-single > section { padding: 0 14px; }
  .tgl-post-title { font-size: 24px !important; margin-bottom: 8px !important; }
  .tgl-breadcrumbs { margin-bottom: 12px !important; }
  .tgl-share-container { margin-bottom: 20px !important; }
  .tgl-media-btn { width: 100%; flex: 1 1 100%; }
}

/* =====================================================================
   Mobile vertical rhythm — single song page (<= 768px)
   ---------------------------------------------------------------------
   Lyrics are the primary content, so this block only reclaims the space
   AROUND them. No font-size, colour, font-family or lyric-block structure
   is changed here; the mobile type scale lives in mobile-ux-precision.css
   and Noto Sans Telugu is untouched.

   Brand colours used below are the live tokens (--tgl-navy = #001B44,
   --tgl-gold = #F2A900), never hardcoded hex, so the Customizer block at
   wp_head:99 stays authoritative.
   ===================================================================== */
@media (max-width: 768px) {

  /* Article shell: 14px -> 12px to match the unified mobile gutter. */
  .tgl-single { padding: 0 12px; margin-top: 12px; }

  /* Title stack: the subtitle's 20px bottom margin plus the title's own
     margin created a large gap before the first lyric line. */
  .tgl-song-subtitle { margin-bottom: 12px !important; }

  /* Section headings (Pallavi / Charanam and the English/Telugu blocks)
     keep a clear boundary but stop double-spacing against lyric lines.
     A gold rule replaces vertical padding as the section separator —
     cheaper in space, clearer in hierarchy. */
  .tgl-single .tgl-content h2 {
    margin: 20px 0 8px !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid var(--tgl-gold, #F2A900) !important;
  }
  .tgl-single .tgl-content h3 {
    margin: 16px 0 6px !important;
    color: var(--tgl-navy, #001B44) !important;
  }

  /* Lyric paragraph blocks: tighten the gap BETWEEN stanzas only. The
     line-height inside a stanza is set in mobile-ux-precision.css. */
  .tgl-single .tgl-content p { margin: 0 0 12px !important; }

  /* Song details / summary: reclaim card padding without crowding. */
  .tgl-summary { margin: 12px 0 16px !important; padding: 12px !important; }

  /* Keep YouTube embeds responsive and flush — no aspect-ratio change. */
  .tgl-single iframe,
  .tgl-single .tgl-video { max-width: 100% !important; }

  /* Share row and related blocks: single consistent rhythm. */
  .tgl-share-container { margin: 14px 0 !important; }
  .tgl-related, .tgl-continue { margin-top: 20px !important; }
}

/* Song Summary — clickable category links (v8.5.0). */
.tgl-summary__value .tgl-summary__link{color:#0A3A8A;text-decoration:none;font-weight:600}
.tgl-summary__value .tgl-summary__link:hover,
.tgl-summary__value .tgl-summary__link:focus-visible{text-decoration:underline;color:#1976D2}

/* --- 11. SONG MEDIA — embedded YouTube + inline audio (v8.6.0) ---------- */
.tgl-song-media { margin: 16px 0 4px; }
.tgl-song-embed {
  margin: 0 0 16px;
  padding: 0;
}
.tgl-song-embed__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tgl-navy, #001B44);
  margin: 0 0 8px;
}
.tgl-song-embed__icon { font-size: 16px; line-height: 1; }
.tgl-song-embed__fallback {
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: #4a5568;
}
.tgl-song-embed__fallback a {
  color: #1976D2;
  font-weight: 600;
  text-decoration: none;
}
.tgl-song-embed__fallback a:hover,
.tgl-song-embed__fallback a:focus-visible { text-decoration: underline; }

.tgl-song-embed__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 18px rgba(0, 27, 68, .14);
}
.tgl-song-embed__frame iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block !important;
}
.tgl-song-audio {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--tgl-line, rgba(0,33,71,.12));
  border-radius: 14px;
  background: var(--tgl-card, #fff);
}
.tgl-song-audio__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tgl-navy, #001B44);
}
.tgl-song-audio__player { width: 100%; display: block; }
.tgl-song-audio__drive {
  width: 100%;
  height: 68px;
  border: 0;
  display: block !important;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .tgl-song-embed { margin-bottom: 12px; }
  .tgl-song-audio { padding: 10px 12px; }
}
