/* ── Design tokens ──────────────────────────────────────────────── */
.rsm-schedule,
.rsm-current-show,
.rsm-current-segment,
.rsm-next-show,
.rsm-next-segment,
.rsm-now-card,
.rsm-header-live,
.rsm-off-air {
  --rsm-primary: #e63012;
  --rsm-live-bg: #e63012;
  --rsm-live-text: #fff;
  --rsm-tab-bg: #f4f4f4;
  --rsm-tab-active-bg: #1a1a1a;
  --rsm-tab-active-text: #fff;
  --rsm-card-bg: #fff;
  --rsm-card-border: #e0e0e0;
  --rsm-card-live-border: #e63012;
  --rsm-radius: 8px;
}

/* ── Schedule wrapper ───────────────────────────────────────────── */
.rsm-schedule {
  font-family: inherit;
  line-height: 1.5;
}

/* ── Day Tabs ───────────────────────────────────────────────────── */
.rsm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--rsm-card-border);
  padding-bottom: 0;
}

.rsm-tab {
  position: relative;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-bottom: none;
  background: var(--rsm-tab-bg);
  color: #444;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--rsm-radius) var(--rsm-radius) 0 0;
  transition:
    background 0.15s,
    color 0.15s;
  text-transform: capitalize;
  line-height: 1.3;
}

.rsm-tab:hover:not(.rsm-tab--active) {
  background: #e5e5e5;
  color: #111;
}

.rsm-tab--active {
  background: var(--rsm-tab-active-bg);
  color: var(--rsm-tab-active-text);
  border-color: var(--rsm-card-border);
  border-bottom-color: var(--rsm-tab-active-bg);
  margin-bottom: -2px;
  z-index: 1;
}

.rsm-tab__today-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--rsm-primary);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Day Panels ─────────────────────────────────────────────────── */
.rsm-day-panel {
  display: none;
}

.rsm-day-panel--active {
  display: block;
}

.rsm-no-shows {
  color: #999;
  font-style: italic;
  padding: 20px 0;
  margin: 0;
}

/* ── Show Cards ─────────────────────────────────────────────────── */
.rsm-show-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rsm-show-card {
  display: flex;
  gap: 16px;
  background: var(--rsm-card-bg);
  border: 1px solid var(--rsm-card-border);
  border-left: 4px solid transparent;
  border-radius: var(--rsm-radius);
  padding: 16px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.rsm-show-card--live {
  border-left-color: var(--rsm-card-live-border);
  box-shadow: 0 2px 12px rgba(230, 48, 18, 0.12);
  background: #fff9f8;
}

.rsm-show-card__img {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  overflow: hidden;
  border-radius: 6px;
}

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

.rsm-show-card__body {
  flex: 1;
  min-width: 0;
}

.rsm-show-card__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.rsm-show-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

.rsm-show-card__time {
  font-size: 0.82rem;
  color: #777;
  margin-left: auto;
  white-space: nowrap;
}

.rsm-show-card__excerpt {
  font-size: 0.86rem;
  color: #555;
  margin: 4px 0 8px;
  line-height: 1.4;
}

/* ── Segment list (inside a show card) ─────────────────────────── */
.rsm-segment-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rsm-segment-item {
  display: flex;
  gap: 12px;
  font-size: 1rem;
  color: #444;
  padding: 5px 0;
  border-top: 1px dashed #ebebeb;
}

.rsm-segment-item__time {
  white-space: nowrap;
  color: #999;
  min-width: 115px;
  font-variant-numeric: tabular-nums;
}

.rsm-segment-item__title {
  font-weight: 500;
}

/* ── Live Badge ─────────────────────────────────────────────────── */
.rsm-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--rsm-live-bg);
  color: var(--rsm-live-text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.rsm-live-badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: rsm-pulse 1.2s ease-in-out infinite;
}

@keyframes rsm-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

/* ── Inline shortcodes: current show/segment ────────────────────── */
.rsm-off-air {
  display: inline-block;
  padding: 10px 18px;
  background: #f5f5f5;
  border-radius: var(--rsm-radius);
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}

.rsm-current-show,
.rsm-current-segment {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--rsm-card-bg);
  border: 1px solid var(--rsm-card-border);
  border-left: 4px solid var(--rsm-primary);
  border-radius: var(--rsm-radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.rsm-current-show__img,
.rsm-current-segment__img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
}

.rsm-current-show__img img,
.rsm-current-segment__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rsm-current-show__info,
.rsm-current-segment__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsm-current-show__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.rsm-current-show__time,
.rsm-current-segment__time {
  font-size: 0.82rem;
  color: #777;
}

.rsm-current-segment__show {
  margin: 0;
  font-size: 0.82rem;
  color: #888;
  font-weight: 500;
}

.rsm-current-segment__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.rsm-current-segment__none {
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
  margin: 0;
}

/* ── Next show / segment ────────────────────────────────────────── */
.rsm-next-show,
.rsm-next-segment {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f9f9f9;
  border: 1px solid var(--rsm-card-border);
  border-radius: var(--rsm-radius);
  font-size: 0.875rem;
}

.rsm-next-show img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.rsm-next-show__info,
.rsm-next-segment {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rsm-next-show__label,
.rsm-next-segment__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.07em;
}

.rsm-next-show__title,
.rsm-next-segment__title {
  font-weight: 600;
  color: #111;
}

.rsm-next-show__time,
.rsm-next-segment__time {
  font-size: 0.78rem;
  color: #888;
}

/* ── Hero card grid (schedule layout) ──────────────────────────── */
.rsm-show-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 20px;
}

/* ── Hero card shell ────────────────────────────────────────────── */
.rsm-hcard {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rsm-card-border);
  background: var(--rsm-card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.rsm-hcard--live {
  border-color: var(--rsm-card-live-border);
  box-shadow:
    0 0 0 2px rgba(230, 48, 18, 0.12),
    0 4px 12px rgba(230, 48, 18, 0.1);
}

/* ── Hero image area ────────────────────────────────────────────── */
.rsm-hcard__hero {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

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

.rsm-hcard__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
}

.rsm-hcard__badge-row {
  margin-bottom: 6px;
}

.rsm-hcard__title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 3px;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.rsm-hcard__time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

/* ── Segment rows inside hero card ──────────────────────────────── */
.rsm-hcard__segs {
  padding: 10px 14px 12px;
  flex: 1;
}

.rsm-seg {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  font-size: 14px;
  color: #555;
  padding: 10px 7px;
  border-radius: 5px;
  border-left: 2px solid transparent;
  margin-bottom: 1px;
  line-height: 1.3;
  border-bottom: 1px solid #eee;
}

.rsm-seg:last-of-type {
  border-bottom: none;
}

.rsm-seg__time {
  min-width: 95px;
  color: #bbb;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.rsm-seg__title {
  font-weight: 500;
}

/* ── Live segment — style 3: raised card + NOW pill ─────────────── */
.rsm-seg--live {
  background: #fff;
  border-left-color: var(--rsm-primary);
  box-shadow: 0 1px 4px rgba(230, 48, 18, 0.18);
}

.rsm-seg--live .rsm-seg__time {
  color: var(--rsm-primary);
  font-weight: 600;
}

.rsm-seg--live .rsm-seg__title {
  font-weight: 700;
  color: #1a1a1a;
}

.rsm-now-pill {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--rsm-primary);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── Header live widget ─────────────────────────────────────────── */
.rsm-header-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
  background: #fff;
  /* border: 1px solid #e0e0e0; */
  /* border-radius: 40px; */
  font-family: inherit;
}

.rsm-header-live__img {
  width: 80px;
  height: 80px;
  border-radius: 10px !important;
  object-fit: cover;
  flex-shrink: 0;
}

.rsm-header-live__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.rsm-header-live__show {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  line-height: 1.2;
}

.rsm-header-live__seg {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  line-height: 1.2;
}

.rsm-header-live__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  background-color: transparent;
  background-image: linear-gradient(
    206deg,
    var(--e-global-color-primary) 0%,
    #f2295b 100%
  );
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 40px;
  flex-shrink: 0;
  transition: background 0.15s;
  line-height: 1;
  margin-top: 5px;
}

.rsm-header-live__btn:hover {
  background: #c4220d;
  color: #fff;
  text-decoration: none;
}

.rsm-header-live__dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  animation: rsm-pulse 1.2s ease-in-out infinite;
}

/* ── Now/Next body cards ─────────────────────────────────────────── */
.rsm-now-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rsm-now-card__hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  overflow: hidden;
  flex-shrink: 0;
}

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

.rsm-now-card__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
}

.rsm-now-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsm-now-card__show-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rsm-primary);
}

.rsm-now-card__seg-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  line-height: 1.25;
}

.rsm-now-card__time {
  font-size: 0.8rem;
  color: #888;
}

/* ── Up Next badge ───────────────────────────────────────────────── */
.rsm-up-next-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rsm-show-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rsm-tab {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .rsm-show-grid {
    grid-template-columns: 1fr;
  }

  .rsm-show-card {
    flex-direction: column;
  }

  .rsm-show-card__img {
    width: 100%;
    height: 180px;
  }

  .rsm-show-card__time {
    margin-left: 0;
    width: 100%;
  }

  .rsm-show-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rsm-current-show,
  .rsm-current-segment {
    flex-direction: column;
  }

  .rsm-current-show__img,
  .rsm-current-segment__img {
    width: 100%;
    height: 160px;
  }
}
