/**
 * Timeline styling
 */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: timeline-counter;
}
.timeline:before {
  content: "";
  position: absolute;
  top: -3em;
  left: 1em;
  width: 0.25em;
  height: calc(100% + 6em);
  background: linear-gradient(
    to bottom,
    var(--menu-main-bg) 0%,
    var(--border) 2%,
    var(--border) 98%,
    var(--menu-main-bg) 100%
  );
}
@media screen and (min-width: 45em) {
  .timeline:before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline__entry {
  position: relative;
  margin-bottom: 4em;
  color: var(--text-main);
}

.timeline__entry--section .timeline__content,
.timeline__entry--section .timeline__content--flipped {
  background-color: #626262;
}

.timeline__entry--section .timeline__section-title {
  color: #fff;
}

.timeline__entry--section .timeline__heading {
  color: #ffe272;
}

.timeline__entry--section .timeline__content::before {
  display: none;
}

.timeline__entry--section .timeline__content::after {
  display: none;
}

.timeline__entry--section .timeline__content--flipped::after {
  display: none;
}

.timeline__entry:after {
  content: "";
  display: table;
  clear: both;
}

.timeline__id {
  position: absolute;
  top: 1.3em;
  left: 1em;
  padding: 0.2em 0.8em;
  background: var(--speaker-card-bg);
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 12px;
}
@media screen and (min-width: 45em) {
  .timeline__id {
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5em 1em;
  }
}

.timeline__id::after {
  counter-increment: timeline-counter;
  /* content: "Ep." counter(timeline-counter); */
  content: counter(timeline-counter);
}

.timeline__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-left: 3.25em;
  padding: var(--space-s);
  background-color: var(--speaker-card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
@media screen and (min-width: 45em) {
  .timeline__content {
    margin-left: 0;
    width: calc(50% - 4em);
  }
}
.timeline__content:before {
  content: "";
  position: absolute;
  display: block;
  top: 1.3em;
  left: -1em;
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-right: 1em solid var(--speaker-card-bg);
  z-index: 1; /* sits above the ::after border triangle */
}
@media screen and (min-width: 45em) {
  .timeline__content:before {
    left: auto;
    right: -1em;
    border-left: 1em solid var(--speaker-card-bg);
    border-right: none;
  }
}

/* Border triangle — 1px larger, sits behind ::before */
.timeline__content:after {
  content: "";
  position: absolute;
  display: block;
  top: calc(1.3em - 1px);
  left: calc(-1em - 1px);
  border-top: calc(1em + 1px) solid transparent;
  border-bottom: calc(1em + 1px) solid transparent;
  border-right: calc(1em + 1px) solid var(--border);
  z-index: 0;
}
@media screen and (min-width: 45em) {
  .timeline__content:after {
    left: auto;
    right: calc(-1em - 1px);
    border-left: calc(1em + 1px) solid var(--border);
    border-right: none;
  }
}

@media screen and (min-width: 45em) {
  .timeline__content--flipped {
    float: right;
  }
  .timeline__content--flipped:before {
    left: -1em;
    right: auto;
    border-left: none;
    border-right: 1em solid var(--speaker-card-bg);
  }
  .timeline__content--flipped:after {
    left: calc(-1em - 1px);
    right: auto;
    border-left: none;
    border-right: calc(1em + 1px) solid var(--border);
  }
}

.timeline__heading {
  color: var(--text-secondary);
  padding-block-end: var(--space-xs);
  border-bottom: 1px solid var(--border);
  font-size: 1.2rem;
  font-weight: 400;
}

/* .timeline__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
} */

.timeline__title {
  margin-bottom: 0.25em;
  font-size: 1.2rem;
}

.timeline__subtitle {
  margin-bottom: 0.25em;
  font-size: 1rem;
  color: var(--accent);
}

.timeline__content > p {
  color: var(--text-main);
  margin-bottom: 0;
}

.timeline__section-title {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* .timeline__text {
  color: var(--text-main);
  margin-bottom: 0;
} */

.timeline__text:last-child {
  margin-bottom: 0;
}

.timeline__content ul {
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: disc;
  padding-left: 1.5rem;
}

.timeline__content ul.ordered_list {
  display: initial;
  list-style-type: initial;
  padding-inline-start: var(--space-m);
}

.timeline__content span.text-highlight {
  color: var(--emphasis);
  font-weight: 400;
}

.timeline__content .text_bold {
  font-weight: 600;
}

/* Timeline Speakers */

.timeline_speakers_wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}

.timeline-speakers-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.timeline-speakers-content p {
  margin-block-end: 0;
  font-size: 0.8rem;
}

.timeline_speakers_headline {
  font-size: inherit;
  font-weight: 400;
  color: var(--accent);
  border-top: 1px solid var(--border);
  padding-block-start: var(--space-xs);
  display: none;
}

.timeline__content .bio-click {
  font-size: var(--text-s);
  color: gray;
}

.timeline_speakers_card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  position: relative;
}

.timeline_speakers_card:not(:last-child) {
  padding-block-end: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

/* Focus within */

.timeline_speakers_card:focus-within :focus {
  outline: none;
  box-shadow: none;
}

/* .timeline_speakers_card:focus-within {
  outline: 1px solid var(--text-secondary);
  outline-offset: 5px;
} */

/* // Focus within */

.timeline-speakers_media {
  flex: 0 0 100px; /* fixed width */
  width: 100px;
}

@media screen and (max-width: 23.75em) {
  .timeline-speakers_media {
    flex: 0 0 25%;
    width: 25%;
  }
}

/* @media screen and (min-width: 600px) {
  .timeline-speakers_media {
    flex: 0 1 180px;
  }
} */

.timeline-speaker-img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.timeline-speaker-name {
  font-size: inherit;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-left: -4px;
}

/* ==========================================================================
   Multi-Day Timeline Sections & Headings
   ========================================================================== */

.timeline__day-section {
  position: relative;
  margin-block-end: 4.5rem;
}

.timeline__day-section:last-child {
  margin-block-end: 0;
}

.timeline__day-heading {
  text-align: center;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 auto 3rem auto;
  padding: 0.6rem 1.6rem;
  background: var(--speaker-card-bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  width: fit-content;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}


/* ==========================================================================
   Parallel Agenda Sub-Tabs
   ========================================================================== */

.timeline__day-section--has-tabs .timeline__day-heading {
  margin: 0 auto 1.25rem auto;
}

.timeline__subtabs-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto 3.5rem auto;
  position: relative;
  z-index: 2;
}

.timeline__subtab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  font-family: inherit;
  font-size: clamp(0.875rem, 1.8vw, 0.95rem);
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--speaker-card-bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline__subtab-btn:hover:not(.is-active) {
  background-color: #ebebeb;
  color: var(--text-secondary);
  border-color: #a8a8a8;
}

.timeline__subtab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.timeline__subtab-btn.is-active {
  background-color: var(--text-secondary);
  color: #ffffff;
  border-color: var(--text-secondary);
  box-shadow: 0 3px 10px rgba(160, 14, 11, 0.25);
  cursor: default;
}

.timeline__tab-panel {
  position: relative;
}

.timeline__tab-panel[hidden] {
  display: none !important;
}

.timeline__tab-panel.is-active {
  display: block;
  animation: timelineTabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes timelineTabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline__empty {
  text-align: center;
  color: var(--text-main);
  font-size: 1rem;
  padding: 2rem 0;
}
