/* 苹果地图风格的路线卡片样式 */
.apple-maps-card {
  background-color: #f5f5f7;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 15px 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 路线起点终点容器 */
.route-endpoints {
  padding: 15px;
  background-color: #f0f0f2;
  border-bottom: 1px solid #e0e0e2;
}

/* 路线点样式 */
.route-point {
  display: flex;
  align-items: center;
  padding: 8px 0;
  position: relative;
}

/* 路线点图标 */
.route-point-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.route-point-icon.start {
  background-color: #8e8e93;
}

.route-point-icon.end {
  background-color: #007aff;
}

.route-point-icon.waypoint {
  background-color: #5ac8fa;
}

/* 路线点名称 */
.route-point-name {
  font-size: 17px;
  font-weight: 500;
  color: #000;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 路线点之间的连接线 */
.route-connector {
  position: absolute;
  left: 16px;
  top: 40px;
  width: 2px;
  height: calc(100% - 16px);
  background-color: #c7c7cc;
}

/* 添加停靠点按钮 */
.add-stop-button {
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: #007aff;
  font-weight: 500;
  cursor: pointer;
}

.add-stop-button i {
  margin-right: 8px;
}

/* 路线选项容器 */
.route-options {
  display: flex;
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e2;
}

.route-option {
  padding: 8px 15px;
  border-radius: 20px;
  margin-right: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.route-option.active {
  background-color: #000;
  color: white;
}

.route-option:not(.active) {
  background-color: #e0e0e2;
  color: #000;
}

/* 路线详情容器 */
.route-details {
  padding: 15px;
  background-color: white;
}

/* 路线摘要 */
.route-summary {
  margin-bottom: 15px;
}

.route-time {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
}

.route-arrival {
  font-size: 15px;
  color: #8e8e93;
  margin-bottom: 5px;
}

.route-distance {
  font-size: 15px;
  color: #8e8e93;
}

.route-type {
  font-size: 15px;
  color: #8e8e93;
  margin-top: 5px;
}

/* 路线步骤 */
.route-steps {
  margin-top: 15px;
}

.route-step {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.route-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #e0e0e2;
  color: #8e8e93;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.route-step-icon.walk {
  background-color: #e0e0e2;
}

.route-step-icon.train {
  background-color: #007aff;
  color: white;
}

.route-step-icon.bus {
  background-color: #5ac8fa;
  color: white;
}

.route-step-icon.subway {
  background-color: #ff9500;
  color: white;
}

.route-step-icon.toll {
  background-color: #4cd964;
  color: white;
}

.route-step-details {
  flex-grow: 1;
}

.route-step-name {
  font-size: 15px;
  font-weight: 500;
}

.route-step-info {
  font-size: 13px;
  color: #8e8e93;
}

/* 路线操作按钮 */
.route-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 15px;
  background-color: white;
  border-top: 1px solid #e0e0e2;
}

.route-action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 15px;
  color: #007aff;
  font-size: 13px;
  cursor: pointer;
}

.route-action-button i {
  font-size: 24px;
  margin-bottom: 5px;
}

/* 警告信息 */
.route-warning {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff9e6;
  border-top: 1px solid #ffcc00;
}

.route-warning-icon {
  color: #ffcc00;
  margin-right: 10px;
  font-size: 18px;
}

.route-warning-text {
  font-size: 13px;
  color: #8e8e93;
}

/* 详细信息窗口 */
.route-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.route-details-modal.active {
  opacity: 1;
  visibility: visible;
}

.route-details-container {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background-color: #f5f5f7;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.route-details-modal.active .route-details-container {
  transform: translateY(0);
}

.route-details-header {
  padding: 15px;
  background-color: #f0f0f2;
  border-bottom: 1px solid #e0e0e2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.route-details-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.route-details-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #8e8e93;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.route-details-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.route-details-body {
  padding: 0;
  overflow-y: auto;
  flex-grow: 1;
}

.route-segment {
  padding: 15px;
  border-bottom: 1px solid #e0e0e2;
}

.route-segment-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.route-segment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 18px;
}

.route-segment-icon.jr {
  background-color: #0065b1;
}

.route-segment-icon.bus {
  background-color: #5ac8fa;
}

.route-segment-icon.subway {
  background-color: #ff9500;
}

.route-segment-icon.walk {
  background-color: #8e8e93;
}

.route-segment-info {
  flex-grow: 1;
}

.route-segment-name {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 4px;
}

.route-segment-details {
  font-size: 14px;
  color: #8e8e93;
}

.route-segment-time {
  font-size: 15px;
  font-weight: 500;
  color: #8e8e93;
  text-align: right;
}

.route-segment-stops {
  margin-top: 10px;
  padding-left: 48px;
  position: relative;
}

.route-segment-stops-line {
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #c7c7cc;
}

.route-stop {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
}

.route-stop:last-child {
  margin-bottom: 0;
}

.route-stop-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #c7c7cc;
  margin-right: 15px;
  position: relative;
  z-index: 1;
}

.route-stop-dot.start, .route-stop-dot.end {
  width: 14px;
  height: 14px;
  background-color: #ff3b30;
}

.route-stop-name {
  font-size: 15px;
  flex-grow: 1;
}

.route-stop-time {
  font-size: 14px;
  color: #8e8e93;
}

.route-segment-warning {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff9e6;
  border-top: 1px solid #ffcc00;
}

.route-segment-warning-icon {
  color: #ffcc00;
  margin-right: 10px;
  font-size: 18px;
}

.route-segment-warning-text {
  font-size: 13px;
  color: #8e8e93;
}

.route-segment-action {
  display: flex;
  justify-content: flex-end;
  padding: 10px 15px;
}

.route-segment-action-button {
  color: #007aff;
  font-size: 15px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}

.route-segment-action-button:hover {
  text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .apple-maps-card {
    margin: 10px 0;
  }

  .route-time {
    font-size: 24px;
  }

  .route-details-container {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
}
