/* Schedule Row-Based Layout Styles */

.schedule-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Header Row */
.schedule-header-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 60px;
  margin-bottom: 20px;
}

.schedule-hall-header {
  text-align: center;
}

/* Time Slot Rows */
.schedule-time-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 60px;
  align-items: start;
  border-top: 1px solid var(--selago, #E8E9F3);
  padding-top: 18px;
  margin-top: 0;
}

.schedule-time-row:first-of-type {
  border-top: 4px solid var(--secondary-deco-color, #5D5FEF);
}

/* Hall Columns */
.schedule-hall-column {
  display: flex;
  flex-direction: column;
}

.schedule-hall-column .event-list {
  border-top: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.schedule-hall-column .event-list__items {
  border-top: 0;
  padding: 0;
  margin: 0;
}

.schedule-hall-column .event-list__items:first-child {
  border-top: none;
}

/* Ensure consistent alignment */
.schedule-hall-column .event-list__items {
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

/* Time wrapper and "iki" styling */
.event-time-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 80px;
  margin-left: 20px;
  height: 40px;
}

.event-time-before {
  position: absolute;
  top: -16px;
  left: 0;
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: lowercase;
  white-space: nowrap;
}

.schedule-hall-column .event-list__time {
  color: var(--secondary-deco-color, #5D5FEF);
  font: bold 26px/1 var(--primary-font, Arial);
  flex-shrink: 0;
  display: block;
}

/* Hide times in Beta and Gama columns (they have .sp class) */
.schedule-hall-column .event-list__time.sp {
  display: none;
}

/* Hide time wrapper when it contains hidden time (for Beta and Gama columns) */
.schedule-hall-column.center_area .event-time-wrapper,
.schedule-hall-column.right_area .event-time-wrapper {
  display: none;
}

.schedule-hall-column .event-list__text {
  flex: 1;
}

/* Mobile responsive */
@media screen and (max-width: 767px) {
  .schedule-header-row {
    display: none;
  }

  .schedule-time-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid var(--selago, #E8E9F3);
    padding-top: 20px;
    margin-bottom: 20px;
  }

  .schedule-time-row:first-of-type {
    border-top: 4px solid var(--secondary-deco-color, #5D5FEF);
  }

  .schedule-hall-column {
    width: 100%;
  }

  .schedule-hall-column .event-list__items.empty {
    display: none;
  }

  /* Show hall name on mobile */
  .schedule-hall-column.left_area::before {
    content: 'Salė Alfa (400 žm.)';
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--secondary-deco-color, #5D5FEF);
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
  }

  .schedule-hall-column.center_area::before {
    content: 'Salė Beta (200 žm.)';
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--secondary-deco-color, #5D5FEF);
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
  }

  .schedule-hall-column.right_area::before {
    content: 'Salė Gama (200 žm.)';
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--secondary-deco-color, #5D5FEF);
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
  }

  .event-time-wrapper {
    width: 100%;
    min-width: auto;
    margin-left: 0;
    display: flex !important; /* Show time wrapper on mobile in all columns */
  }

  /* Show time wrappers in all columns on mobile */
  .schedule-hall-column.center_area .event-time-wrapper,
  .schedule-hall-column.right_area .event-time-wrapper {
    display: flex !important;
  }

  .event-time-before {
    position: static;
    top: auto;
    left: auto;
    margin-bottom: 4px;
  }

  .schedule-hall-column .event-list__time {
    display: block !important; /* Show times on mobile in all columns */
    width: 100%;
    margin-bottom: 10px;
  }

  .schedule-hall-column .event-list__time.sp {
    display: block !important; /* Override desktop hiding on mobile */
  }

  .schedule-hall-column .event-list__items {
    flex-direction: column;
  }
}

/* Tablet responsive */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .schedule-header-row,
  .schedule-time-row {
    gap: 20px 40px;
  }
}
