.route-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.route-box:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.route-header {
  padding: 10px 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.route-title {
  font-size: 0.925rem;
  font-weight: 600;
  color: #111827;
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-badge {
  font-size: 0.75rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.connection-grid {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
}

.connection-grid:last-child {
  border-bottom: none;
}

.logo-cell {
  width: 100px;
  height: 24px;
  display: flex;
  align-items: center;
}

.logo-cell img {
  max-width: 100%;
  max-height: 24px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.info-cell {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.info-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #4b5563;
  white-space: nowrap;
}

.info-item svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}

.action-cell {
  display: flex;
  align-items: center;
}

.btn-book {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #2563eb;
  background: transparent;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-book:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.btn-book svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.btn-book:disabled {
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.btn-book:disabled:hover {
  background: transparent;
}

/* Mobile Layout */
@media (max-width: 640px) {
  .route-box {
    margin-bottom: 10px;
  }

  .route-header {
    padding: 8px 10px;
  }

  .route-title {
    font-size: 0.875rem;
  }

  .connection-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .logo-cell {
    width: auto;
    justify-content: flex-start;
  }

  .info-cell {
    gap: 12px;
  }

  .action-cell {
    width: 100%;
  }

  .btn-book {
    width: 100%;
    justify-content: center;
    padding: 6px 12px;
  }
}

/* Ultra-compact variant */
.route-box.compact {
  margin-bottom: 8px;
}

.route-box.compact .route-header {
  padding: 6px 10px;
  background: transparent;
}

.route-box.compact .route-title {
  font-size: 0.875rem;
}

.route-box.compact .connection-grid {
  padding: 8px 10px;
  gap: 10px;
}

.route-box.compact .logo-cell {
  width: 80px;
  height: 20px;
}

.route-box.compact .logo-cell img {
  max-height: 20px;
}

.route-box.compact .info-item {
  font-size: 0.7rem;
}

.route-box.compact .btn-book {
  padding: 3px 8px;
  font-size: 0.7rem;
}
