/* Стили для страницы с расписанием транспорта */

/* Стили для вкладок с маршрутами */
.route-tabs {
  margin-bottom: 20px;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.route-tab {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  border: 1px solid transparent;
  text-align: center;
}

.route-tab:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
}

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

/* Стили для отображения деталей маршрута */
.route-detail {
  display: none;
  animation: fadeIn 0.5s ease;
}

.route-detail.active {
  display: block;
}

.route-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.route-icon {
  width: 36px;
  height: 36px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.route-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.route-details-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.route-detail-item {
  flex: 1;
  min-width: 250px;
}

.route-detail-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.route-detail-value {
  color: var(--text-color);
}

/* Стили для списка остановок */
.stops-header {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.stops-list {
  border-left: 2px dashed var(--primary-color);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  list-style: none;
}

.stop-item {
  position: relative;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stop-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.stop-item:first-child::before {
  background-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

.stop-item:last-child {
  border-bottom: none;
}

.stop-item:last-child::before {
  background-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

.stop-name {
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.stop-time {
  font-size: 0.875rem;
  color: var(--secondary-text-color);
  display: block;
}

/* Стили для направлений */
.route-directions {
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.direction-tab {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
}

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

.direction-content {
  display: none;
}

.direction-content.active {
  display: block;
}

/* Расписание отправления */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.schedule-table th,
.schedule-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.schedule-table th {
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.schedule-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Информация о маршруте */
.route-card {
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.route-card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--heading-color);
}

.route-card-content {
  color: var(--text-color);
}

/* Загрузчик */
.route-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.loader-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

/* Анимация появления */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .route-tabs {
    padding-bottom: 5px;
    justify-content: center;
  }

  .route-tab {
    padding: 6px 12px;
    font-size: 14px;
    flex-basis: calc(33.33% - 8px);
    min-width: 60px;
  }

  .route-name {
    font-size: 1.25rem;
  }

  .stops-header {
    font-size: 1.1rem;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .route-directions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .direction-tab {
    text-align: center;
  }
}

@media (min-width: 769px) {
  .route-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .route-tab {
    flex: 0 0 auto;
  }
}