/* Mobile-Friendly Schedule Styles with Fixed Positioning */
.schedule-section {
  padding: var(--section-spacing) 0;
  position: relative;
}

/* Day tabs - simple and mobile-friendly */
.schedule-tabs {
  display: flex;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 30px;
  justify-content: flex-start; /* Change from center to flex-start */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-padding-left: 16px; /* Add scroll padding */
  gap: 10px; /* Use gap instead of margin for better spacing */
  padding-left: 16px; /* Add left padding to ensure first tab is visible */
  padding-right: 16px; /* Add right padding for consistency */
}

.schedule-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar on Chrome/Safari */
}

.schedule-tab {
  padding: 8px 16px;
  background-color: var(--color-bg-alt);
  border-radius: 20px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 0 5px;
  border: none;
}

.schedule-tab:hover {
  background-color: rgba(var(--color-primary-rgb), 0.1);
}

.schedule-tab.active {
  background-color: var(--color-primary);
  color: white;
}

/* Timeline container */
.timeline {
  position: relative;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

/* Vertical line - moved to ensure no overlap with time */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px; /* Increased from 20px to prevent overlap */
  width: 2px;
  height: 100%;
  background-color: var(--color-border);
  z-index: 1;
}

/* Timeline items */
.timeline-item {
  position: relative;
  padding-left: 80px; /* Increased from 60px to accommodate time and dot */
  padding-bottom: 25px;
  margin-bottom: 5px;
}

/* The circle dot - repositioned */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 36px; /* Moved to match the vertical line position */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-border);
  z-index: 2;
}

.timeline-item.active::before,
.timeline-item.current::before {
  /*background-color: var(--color-primary);*/
  width: 14px;
  height: 14px;
  left: 34px; /* Adjusted for larger dot */
  top: 13px;
}

/* Current program indicator */
.timeline-item.current .timeline-content {
  border-left: 3px solid var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.05);
}

/* Time display - positioned to avoid overlap */
.timeline-time {
  position: absolute;
  left: 0;
  top: 10px;
  width: 30px; /* Narrower to prevent overlap */
  text-align: right;
}

.timeline-time .time {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  display: block;
}

.timeline-time .period {
  display: none; /* Hide on mobile to save space */
}

/* Content card */
.timeline-content {
  background-color: var(--color-bg-alt);
  padding: 15px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
}

.timeline-content h3 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--color-text);
}

.timeline-content p {
  font-size: 14px;
  color: var(--color-text-light);
  margin: 0;
}

/* Program type label - simplified */
.program-type {
  display: inline-block;
  padding: 3px 8px;
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

/* Live indicator - simple version */
.live-indicator {
  display: inline-block;
  padding: 3px 8px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* Navigation buttons */
.schedule-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.schedule-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.schedule-nav button:hover {
  background-color: var(--color-primary);
  color: white;
}

/* Desktop enhancements */
@media (min-width: 768px) {
  .timeline::before {
    left: 120px;
  }
  
  .timeline-item {
    padding-left: 160px;
    padding-bottom: 30px;
  }
  
  .timeline-item::before {
    left: 116px;
    top: 20px;
  }
  
  .timeline-item.active::before,
  .timeline-item.current::before {
    left: 114px;
    top: 18px;
  }
  
  .timeline-time {
    width: 100px;
    text-align: right;
    top: 15px;
  }
  
  .timeline-time .time {
    font-size: 16px;
  }
  
  .timeline-time .period {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    margin-top: 5px;
    background-color: var(--color-bg-alt);
    border-radius: 10px;
    color: var(--color-text-light);
  }
  
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
}

/* Extra small screens optimization */
@media (max-width: 350px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    padding-left: 60px;
  }
  
  .timeline-item::before {
    left: 26px;
  }
  
  .timeline-item.active::before,
  .timeline-item.current::before {
    left: 24px;
  }
  
  .timeline-time {
    width: 25px;
    font-size: 12px;
  }
  
  .timeline-time .time {
    font-size: 12px;
  }
  
  .program-type, .live-indicator {
    display: none; /* Hide on very small screens */
  }
  
  .toggle-schedule {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}


/* Separate day of week colors - optional */
.monday-tab.active { background-color: var(--color-primary); }
.tuesday-tab.active { background-color: #4361ee; }
.wednesday-tab.active { background-color: #3a0ca3; }
.thursday-tab.active { background-color: #7209b7; }
.friday-tab.active { background-color: #f72585; }
.saturday-tab.active { background-color: #4cc9f0; }
.sunday-tab.active { background-color: #4895ef; }

/* Time period colors */
.morning .timeline-time .period { color: #ff9500; }
.midday .timeline-time .period { color: #f72585; }
.afternoon .timeline-time .period { color: #4361ee; }
.evening .timeline-time .period { color: #7209b7; }
.night .timeline-time .period { color: #3a0ca3; }

/* All shows container */
.all-shows-container {
    transition: all 0.3s ease;
    overflow: hidden;
}

.all-shows-container.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.all-shows-container:not(.hidden) {
    max-height: 2000px;
    opacity: 1;
    margin: 2rem 0;
}

/* Toggle button */
.toggle-schedule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto;
    padding: 0.8rem 1.5rem;
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-schedule:hover {
    background-color: var(--color-primary);
    color: white;
}

.toggle-schedule i {
    transition: transform 0.3s ease;
}

.toggle-schedule.expanded i {
    transform: rotate(180deg);
}