/*
 * Small, channel-only adaptations to the existing .guide timeline in
 * design-source/channels/site.css. Load after that stylesheet.
 */
.channel-guide {
  --on-ground: #e6eadf;
  --on-ground-ink: #e6eadf;
  --on-ground-muted: #bdc9b6;
  --channel-guide-playhead: #ef9b82;
  color: var(--on-ground);
  background-color: #193d2a;
  background-image: radial-gradient(#bfd3ad14 .7px, transparent .9px);
  background-size: 4px 4px;
  overflow: clip;
}

.channel-guide .guide__in {
  min-width: 0;
}

.channel-guide__scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding-block: 6px 10px;
  scrollbar-color: #a4d979 #294634;
  scrollbar-width: auto;
  -webkit-overflow-scrolling: touch;
}

.channel-guide__scroll::-webkit-scrollbar {
  height: 10px;
}

.channel-guide__scroll::-webkit-scrollbar-track {
  background: #294634;
}

.channel-guide__scroll::-webkit-scrollbar-thumb {
  border: 2px solid #294634;
  background: #a4d979;
}

.channel-guide .guide__strip {
  position: relative;
  width: 100%;
  min-width: 1200px;
  height: 176px;
  border-top: 1px solid color-mix(in srgb, var(--on-ground) 45%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--on-ground) 45%, transparent);
}

.channel-guide .guide__axis,
.channel-guide .guide__parts,
.channel-guide .guide__progs {
  position: static;
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.channel-guide .guide__axis li {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--x) * 100%);
  border-left: 1px dashed color-mix(in srgb, var(--on-ground) 22%, transparent);
}

.channel-guide .guide__axis li:last-child {
  border-left: 0;
}

.channel-guide .guide__axis span {
  position: absolute;
  top: 8px;
  left: 6px;
}

.channel-guide .guide__axis li:last-child span {
  right: 4px;
  left: auto;
}

.channel-guide .guide__parts li {
  position: absolute;
  bottom: 8px;
  left: calc(var(--a) * 100%);
  width: calc(var(--b) * 100%);
  overflow: hidden;
  padding-left: 6px;
  color: var(--on-ground-muted);
  font: 500 0.64rem var(--f-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-guide .guide__progs li {
  position: absolute;
  top: 40px;
  left: calc(var(--a) * 100%);
  width: calc(var(--b) * 100%);
  height: 96px;
  min-width: 0;
  padding-inline: 3px;
}

.channel-guide .guide__prog {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  min-width: 0;
  padding: 10px 12px;
  overflow: visible;
}

.channel-guide .guide__time {
  grid-row: auto;
  align-self: auto;
  font-size: 1rem;
  line-height: 1.1;
}

.channel-guide .guide__name {
  font-size: 1rem;
  line-height: 1.1;
  overflow-wrap: normal;
  hyphens: manual;
}

.channel-guide .guide__head,
.channel-guide .guide__head::before {
  background: var(--channel-guide-playhead);
}

.channel-guide .guide__head {
  display: block;
}

.channel-guide__hint {
  display: none;
}

.channel-guide__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.channel-guide .guide__prog:focus-visible,
.channel-guide__scroll:focus-visible {
  outline: 2px solid var(--channel-guide-playhead);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .channel-guide__scroll {
    padding: 2px 2px 8px;
    scrollbar-width: auto;
  }

  .channel-guide .guide__strip {
    min-width: 1200px;
  }

  .channel-guide__hint {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 9px;
    color: var(--on-ground-muted);
    font: 500 0.64rem var(--f-mono);
    letter-spacing: 0.035em;
  }

  .channel-guide__hint span {
    color: var(--lime);
  }
}

@media (prefers-reduced-motion: reduce) {
  .channel-guide .guide__prog,
  .channel-guide .guide__prog::before,
  .channel-guide .guide__name,
  .channel-guide .guide__n {
    transition: none;
  }
}
