/* =========================================
   TV + Radio scroller (contained & responsive)
   ========================================= */

/* Desktop defaults (5-up) */
.content-text #tvradio-rail{
  --thumb-w: 150px;
  --thumb-h: 108px;
  --gap: 12px;

  position: relative;
  width: 100%;
  max-width: calc(5 * var(--thumb-w) + 4 * var(--gap)); /* 808px */
  margin: 8px 0 0 0;
  padding: 0;
  overflow: hidden; /* never widen the page */
}

.content-text #tvradio-rail .tvr-viewport{
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.content-text #tvradio-rail .tvr-track{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--thumb-w);
  gap: var(--gap);
  margin: 0;
  padding: 6px 0;                 /* no side padding => no “wings” */
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.content-text #tvradio-rail .tvr-track::-webkit-scrollbar{ display:none; }

/* Card: no outer border so edges don’t show stray lines */
.content-text #tvradio-rail .tvr-card{
  width: var(--thumb-w);
  min-width: var(--thumb-w);
  background: transparent;
  border: 0;                       /* ← kills the left/right “mystery borders” */
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  user-select: none;
  scroll-snap-align: start;
}

/* Clickable image area */
.content-text #tvradio-rail .tvr-thumb-link{
  position: relative;
  display: flex;
  justify-content: center;         /* centers image within card */
  text-decoration: none;
}

/* The thumbnail carries the visual border */
.content-text #tvradio-rail .tvr-thumb{
  display: block;
  width: var(--thumb-w);
  height: var(--thumb-h);
  object-fit: cover;
  border-radius: 6px;              /* full card look from the image itself */
  border: 1px solid #ccc;
  margin: 0 auto;                  /* keeps it centered */
}

/* Title below (same fixed width) */
.content-text #tvradio-rail .tvr-title-link{
  display: block;
  width: var(--thumb-w);
  box-sizing: border-box;
  padding: 8px;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  line-height: 1.25;
  font-size: 0.95rem;
  margin: 0 auto;                  /* center to image */
}
.content-text #tvradio-rail .tvr-title{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;           /* ~40 chars / up to 2 lines */
  overflow: hidden;
  min-height: 3.6em;               /* even rows */
}

/* Myron Cope badge (bottom-left) */
.content-text #tvradio-rail .tvradio-badge{
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 300;
  background: #000;
  color: #FCCE00;
  font-size: 11px;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 12px;
  border: 1px solid #333;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.content-text #tvradio-rail .tvradio-badge .tvradio-badge-star{
  font-size: 12px;
  transform: translateY(-1px);
}

/* Overlay arrows (visible on mobile + desktop) */
.content-text #tvradio-rail .tvr-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid #999;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  z-index: 400; /* above badge */
  transition: transform 0.12s ease, background 0.12s ease;
}
.content-text #tvradio-rail .tvr-left{ left: 4px; }
.content-text #tvradio-rail .tvr-right{ right: 4px; }
.content-text #tvradio-rail .tvr-arrow:hover{ transform: translateY(-50%) scale(1.05); background: #fff; }
.content-text #tvradio-rail .tvr-arrow:disabled{ opacity: .4; cursor: default; }

/* Drag cursor hints */
.content-text #tvradio-rail .tvr-track.grab{ cursor: grab; }
.content-text #tvradio-rail .tvr-track.grabbing{ cursor: grabbing; }

/* =========================
   Mobile clamp (2-up exact)
   ========================= */
@media (max-width: 768px){
  .content-text #tvradio-rail{
    --thumb-w: 140px;
    --thumb-h: 100px;
    --gap: 10px;

    max-width: calc(2 * var(--thumb-w) + 1 * var(--gap)); /* exactly 2 cards + gap */
    margin-left: auto;
    margin-right: auto;
  }
  .content-text #tvradio-rail .tvr-title-link{
    font-size: .9rem;
    padding: 6px;
  }
  .content-text #tvradio-rail .tvradio-badge{
    font-size: 10px; padding: 4px 6px;
  }
  .content-text #tvradio-rail .tvr-arrow{
    width: 32px; height: 32px; font-size: 18px;
  }
}

