/* ============================================================================
   Participant program timeline (вкладка «Программа»)
   Gated on the client by options.programTimeline — only the event-participant
   surface emits the .event-info-tl-* markup, so /room and the public info page
   keep the flat list. All colours come from theme variables so light/dark both
   work without per-theme overrides.
   ========================================================================== */

.event-info-timeline {
  display: flex;
  flex-direction: column;
}

/* Row → 3 columns: time | rail | content. Overrides the generic card box. */
.event-info-card.event-info-tl-row {
  position: relative;
  grid-template-columns: 52px 18px minmax(0, 1fr);
  grid-template-rows: none;
  align-items: stretch;
  gap: 0 10px;
  padding: 0 6px 0 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

/* --- time column --- */
.event-info-tl-time {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 12px;
  text-align: right;
  white-space: nowrap;
}

.event-info-tl-row .event-info-tl-time b {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.event-info-tl-row .event-info-tl-time i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  opacity: 0.8;
}

/* --- rail (vertical line + node) --- */
.event-info-tl-track {
  grid-column: 2;
  position: relative;
  align-self: stretch;
}

.event-info-tl-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--border);
}

.event-info-tl-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 2px solid var(--border);
}

.event-info-tl-row:first-child .event-info-tl-track::before { top: 18px; }
.event-info-tl-row:last-child .event-info-tl-track::before { bottom: auto; height: 6px; }

/* --- content column --- */
.event-info-tl-main {
  grid-column: 3;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 0 12px;
}

.event-info-tl-row .event-info-tl-main strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.event-info-tl-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.event-info-tl-row .event-info-tl-badges span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.event-info-tl-row .event-info-tl-badges em {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgb(var(--room-accent-rgb, 57, 217, 138));
  color: #04140d;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* --- current session --- */
.event-info-card.event-info-tl-row.is-current .event-info-tl-track::after {
  background: rgb(var(--room-accent-rgb, 57, 217, 138));
  border-color: rgb(var(--room-accent-rgb, 57, 217, 138));
  box-shadow: 0 0 0 4px rgba(var(--room-accent-rgb, 57, 217, 138), 0.2);
}

.event-info-card.event-info-tl-row.is-current .event-info-tl-time b {
  color: rgb(var(--room-accent-rgb, 57, 217, 138));
}

.event-info-card.event-info-tl-row.is-current .event-info-tl-main {
  padding: 10px 12px;
  margin: 4px 0 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(var(--room-accent-rgb, 57, 217, 138), 0.16), rgba(var(--room-warm-rgb, 242, 193, 78), 0.06));
  box-shadow: inset 0 0 0 1px rgba(var(--room-accent-rgb, 57, 217, 138), 0.24);
}

.event-info-tl-progress {
  height: 4px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(var(--room-accent-rgb, 57, 217, 138), 0.18);
  overflow: hidden;
}

.event-info-tl-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgb(var(--room-accent-rgb, 57, 217, 138));
  transition: width 0.4s ease;
}

.event-info-tl-row .event-info-tl-remaining {
  color: rgb(var(--room-accent-rgb, 57, 217, 138));
  font-size: 11px;
  font-weight: 700;
}

/* --- past sessions dimmed --- */
.event-info-card.event-info-tl-row.is-past { opacity: 0.48; }
.event-info-card.event-info-tl-row.is-past .event-info-tl-track::after { border-color: var(--border); }

/* --- breaks / non-talk blocks: swap the node for a glyph --- */
.event-info-card.event-info-tl-row.is-break .event-info-tl-main strong {
  color: var(--muted);
  font-weight: 700;
}

.event-info-tl-row[data-info-block-type="break"] .event-info-tl-track::after,
.event-info-tl-row[data-info-block-type="lunch"] .event-info-tl-track::after,
.event-info-tl-row[data-info-block-type="networking"] .event-info-tl-track::after {
  content: "\2615"; /* ☕ */
  width: auto;
  height: auto;
  top: 9px;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.event-info-tl-row[data-info-block-type="lunch"] .event-info-tl-track::after { content: "\1F37D"; }        /* 🍽 */
.event-info-tl-row[data-info-block-type="networking"] .event-info-tl-track::after { content: "\1F91D"; }   /* 🤝 */

/* --- "Программа завершена" banner (all sessions in the past) --- */
.event-info-tl-finished {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

/* --- "Далее через N мин" divider --- */
.event-info-tl-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 8px;
  padding-left: 62px;
  color: rgb(var(--room-accent-rgb, 57, 217, 138));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-info-tl-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--room-accent-rgb, 57, 217, 138), 0.45), transparent);
}

/* --- star stays in the row's top-right corner --- */
.event-info-card.event-info-tl-row.has-program-star { padding-right: 38px; }
.event-info-card.event-info-tl-row .info-program-star { top: 8px; right: 0; }

/* --- «Моя программа» toolbar: add the calendar export button --- */
.event-program-mine-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-program-ics {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.event-program-ics:hover { border-color: var(--gold); color: var(--gold); }

/* --- sticky day/hall filters inside the dedicated program tab --- */
#eventProgramModuleBody .event-info-program-filters {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 -4px 8px;
  padding: 8px 4px;
  background: var(--bg, #0b1512);
  backdrop-filter: blur(8px);
}

/* --- floating "↓ Сейчас" jump button --- */
.event-program-jump {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 82px);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgb(var(--room-accent-rgb, 57, 217, 138));
  color: #04140d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.event-program-jump.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .event-info-tl-progress > span,
  .event-program-jump { transition: none; }
}
