/* ============================================
   黄山旅游线路规划 H5 - 全局样式
   ============================================ */

/* CSS Variables - Design System */
:root {
  --primary-color: #1677FF;
  --primary-dark: #0958D9;
  --bg-color: #F5F7FA;
  --card-bg: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --border-color: #E5E7EB;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-color);
}

/* ============================================
   App Container - Mobile-First Responsive
   ============================================ */

.app-container {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Smooth scrolling for the whole app */
html {
  scroll-behavior: smooth;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  padding: var(--spacing-sm) var(--spacing-md);
  padding-bottom: 72px;
}

/* PC / larger screens - phone mockup mode */
@media (min-width: 376px) {
  body {
    background: #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }

  .app-container {
    width: 375px;
    max-width: 375px;
    height: 812px;
    min-height: 812px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
  }

  .tab-bar {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
  }
}

/* Mobile screens - full width */
@media (max-width: 375px) {
  .app-container {
    width: 100%;
  }
  .tab-bar {
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
  }
}

/* ============================================
   Tab Content & Navigation
   ============================================ */

.tab-content {
  display: none;
  min-height: 100%;
}

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

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 56px;
  background: white;
  border-top: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  display: flex;
  z-index: 100;
}

/* Ensure tab bar stays above content */
.tab-bar {
  z-index: 100;
}

/* Ensure modals stay above everything */
.modal-overlay {
  z-index: 200;
}

/* Ensure overview container has proper height */
#overview-container {
  min-height: 400px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 10px;
  padding: 4px 0;
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-label {
  font-size: 10px;
}

/* ============================================
   Page Title & Placeholder
   ============================================ */

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.placeholder-text {
  color: var(--text-secondary);
  text-align: center;
  padding: var(--spacing-xl) 0;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: var(--spacing-lg);
}

.form-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 12px;
}

/* Buttons */
.btn-primary {
  flex: 1;
  padding: 14px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
}

.btn-secondary {
  flex: 1;
  padding: 14px 24px;
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
}

/* ============================================
   Date Picker Component
   ============================================ */

.date-picker {
  position: relative;
}

.date-display {
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.date-display .placeholder {
  color: var(--text-secondary);
}

.date-display .date-range {
  color: var(--text-primary);
  font-weight: 500;
}

.date-calendar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 50;
  margin-top: 4px;
  padding: var(--spacing-md);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.calendar-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 12px;
  color: var(--text-primary);
}

.calendar-header .month-year {
  font-weight: 600;
  font-size: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.calendar-day:hover {
  background: var(--bg-color);
}

.calendar-day.other-month {
  color: var(--text-secondary);
}

.calendar-day.selected {
  background: var(--primary-color);
  color: white;
}

.calendar-day.in-range {
  background: rgba(22, 119, 255, 0.2);
}

.calendar-day.start-date,
.calendar-day.end-date {
  background: var(--primary-color);
  color: white;
}

.date-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.date-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.date-actions .btn-cancel {
  background: var(--bg-color);
  color: var(--text-secondary);
}

.date-actions .btn-confirm {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   Number Input Component
   ============================================ */

.number-input {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.number-input button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.number-input input {
  width: 60px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 16px;
  -moz-appearance: textfield;
}

.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================
   Radio Group Component
   ============================================ */

.radio-group {
  display: flex;
  gap: var(--spacing-md);
}

.radio-btn {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.radio-btn input {
  display: none;
}

.radio-btn.active {
  border-color: var(--primary-color);
  background: rgba(22, 119, 255, 0.1);
}

.radio-btn.active span {
  color: var(--primary-color);
  font-weight: 500;
}

/* ============================================
   Tag Select Component
   ============================================ */

.tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tag {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.tag.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================================
   Spot Card & Selector Components
   ============================================ */

.spot-selector h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: var(--spacing-md) 0 var(--spacing-sm);
}

.spot-selector h3:first-child {
  margin-top: 0;
}

.spot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.spot-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.2s;
}

.spot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.spot-card.selected {
  box-shadow: 0 0 0 2px var(--primary-color);
}

.spot-card img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  background: var(--bg-color);
}

.spot-info {
  padding: 8px;
}

.spot-info h4 {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-info .price {
  font-size: 11px;
  color: var(--primary-color);
  font-weight: 500;
}

.spot-checkbox {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--primary-color);
}

.spot-card.selected .spot-checkbox {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   Spot Detail Modal - Bottom Sheet
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

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

.spot-detail-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 375px;
  background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 201;
  max-height: 85vh;
  overflow-y: auto;
  transition: transform 0.3s ease-out;
}

.spot-detail-modal.active {
  transform: translateX(-50%) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  position: relative;
}

.modal-drag-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
}

.modal-close {
  position: absolute;
  right: var(--spacing-md);
  top: var(--spacing-sm);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-color);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
}

.modal-body {
  padding: var(--spacing-md);
}

.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
}

.modal-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #FFB800;
  font-weight: 500;
}

.modal-info-row {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.modal-tag {
  padding: 4px 12px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.modal-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-detail-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.modal-detail-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ============================================
   Route Map Component
   ============================================ */

.route-map-container {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.route-map {
  width: 100%;
  height: 280px;
  background: #F5F0E8;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.route-map-svg {
  width: 100%;
  height: 100%;
}

/* 等高线样式 */
.contour-line {
  fill: none;
  stroke: #D4CFC4;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* 景点标记 */
.spot-marker {
  fill: var(--primary-color);
  stroke: white;
  stroke-width: 2;
  cursor: pointer;
}

.spot-marker-label {
  font-size: 10px;
  fill: var(--text-primary);
  text-anchor: middle;
  pointer-events: none;
}

/* Day标记 */
.day-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.day-marker-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 2px solid;
}

.day-marker-count {
  font-size: 10px;
  color: var(--text-secondary);
  background: white;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 路线path */
.route-path {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 5,5;
}

.route-path-day-1 { stroke: #1677FF; }
.route-path-day-2 { stroke: #3B82F6; }
.route-path-day-3 { stroke: #F59E0B; }
.route-path-day-4 { stroke: #EF4444; }
.route-path-day-5 { stroke: #8B5CF6; }

/* 路线箭头 */
.route-arrow {
  fill: currentColor;
}

/* 路线详情弹窗 */
.route-detail-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 375px;
  background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 201;
  max-height: 70vh;
  overflow-y: auto;
  transition: transform 0.3s ease-out;
}

.route-detail-modal.active {
  transform: translateX(-50%) translateY(0);
}

.route-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.route-detail-title {
  font-size: 18px;
  font-weight: 600;
}

.route-spot-list {
  padding: var(--spacing-md);
}

.route-spot-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.route-spot-order {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.route-spot-info {
  flex: 1;
}

.route-spot-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.route-spot-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.route-spot-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: var(--spacing-sm) 0;
  margin-left: 44px;
}

.route-summary {
  padding: var(--spacing-md);
  background: var(--bg-color);
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border-color);
}

.route-summary-item {
  text-align: center;
}

.route-summary-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.route-summary-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 地图图例 */
.route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.route-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.route-legend-color {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

/* ============================================
   Budget Detail Component
   ============================================ */

.budget-container {
  padding: var(--spacing-md);
}

/* Tier Tabs */
.budget-tier-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.budget-tier-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.budget-tier-tab.active.budget {
  background: #1677FF;
  color: white;
  border-color: #1677FF;
}

.budget-tier-tab.active.mid {
  background: #1677FF;
  color: white;
  border-color: #1677FF;
}

.budget-tier-tab.active.luxury {
  background: #F59E0B;
  color: white;
  border-color: #F59E0B;
}

/* Budget Sections */
.budget-section {
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.budget-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  cursor: pointer;
  transition: background 0.2s;
}

.budget-section-header:hover {
  background: var(--bg-color);
}

.budget-section-header.collapsed::after {
  content: '▼';
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.budget-section-header::after {
  content: '▲';
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.budget-section-title {
  font-weight: 500;
  font-size: 15px;
}

.budget-section-amount {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 16px;
}

.budget-section-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.budget-section-content.collapsed {
  display: none;
}

.budget-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  font-size: 14px;
}

.budget-item-name {
  color: var(--text-secondary);
  flex: 1;
}

.budget-item-calc {
  color: var(--text-primary);
  font-weight: 500;
}

/* Day Meals */
.budget-day-meals {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.budget-day-meals:last-child {
  border-bottom: none;
}

.budget-day-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px dashed var(--border-color);
}

/* Total Card */
.budget-total {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 343px;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.budget-total-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.budget-total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Empty State */
.budget-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

/* ============================================
   Shop List Component
   ============================================ */

.shop-container {
  padding: var(--spacing-md);
  padding-bottom: 120px;
}

.shop-section {
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.shop-section-title {
  font-size: 16px;
  font-weight: 600;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.shop-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

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

.shop-item-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-color);
  flex-shrink: 0;
}

.shop-item-info {
  flex: 1;
  min-width: 0;
}

.shop-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-item-price {
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-item-calc {
  text-align: right;
  margin-right: var(--spacing-sm);
}

.shop-item-subtotal {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.shop-item-quantity {
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-item-buy {
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  flex-shrink: 0;
}

.shop-item-buy:active {
  background: var(--primary-dark);
}

/* Shop Total Card */
.shop-total {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 343px;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}

.shop-total-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.shop-total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Confirmation Modal */
.shop-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.shop-confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

.shop-confirm-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  width: calc(100% - 48px);
  max-width: 280px;
  text-align: center;
}

.shop-confirm-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.shop-confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.5;
}

.shop-confirm-actions {
  display: flex;
  gap: var(--spacing-md);
}

.shop-confirm-actions button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.shop-confirm-cancel {
  background: var(--bg-color);
  color: var(--text-secondary);
}

.shop-confirm-confirm {
  background: var(--primary-color);
  color: white;
}

/* Empty State */
.shop-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

/* ============================================
   Itinerary Overview Component
   ============================================ */

.overview-container {
  padding-bottom: 72px;
}

/* Empty State */
.overview-empty {
  text-align: center;
  padding: var(--spacing-xl) 0;
  color: var(--text-secondary);
}

.overview-empty p {
  margin-bottom: var(--spacing-lg);
  font-size: 14px;
}

/* Day Tabs */
.overview-day-tabs {
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.overview-day-tabs::-webkit-scrollbar {
  display: none;
}

.overview-day-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

/* Day Summary Card */
.overview-day-summary {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.overview-date {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px dashed var(--border-color);
}

.overview-date-icon {
  font-size: 16px;
}

.overview-date-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.overview-stats {
  display: flex;
  justify-content: space-around;
  gap: var(--spacing-sm);
}

.overview-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.overview-stat-icon {
  font-size: 14px;
}

.overview-stat-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Timeline */
.overview-timeline {
  position: relative;
  padding-left: 60px;
}

.overview-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.overview-timeline-item {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.overview-timeline-marker {
  position: absolute;
  left: -60px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.overview-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}

.overview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--primary-color);
  z-index: 1;
}

.overview-dot-meal {
  background: var(--primary-color);
}

.overview-timeline-content {
  padding-left: var(--spacing-sm);
}

/* Spot Cards */
.overview-spot-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.2s;
}

.overview-spot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.overview-spot-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.overview-spot-info {
  flex: 1;
  min-width: 0;
}

.overview-spot-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-spot-meta {
  display: flex;
  gap: var(--spacing-sm);
  font-size: 12px;
}

.overview-spot-duration {
  color: var(--primary-color);
  background: rgba(22, 119, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.overview-spot-price {
  color: var(--text-secondary);
}

.overview-spot-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Meal Cards */
.overview-meal-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(22, 119, 255, 0.1);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-color);
}

.overview-meal-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.overview-meal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overview-meal-type {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 500;
}

.overview-meal-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.overview-meal-price {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}

/* ============================================
   Tianditu Map Integration
   ============================================ */

.tianditu-map-container {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.tianditu-map {
  width: 100%;
  height: 350px;
  background: #f0f0f0;
}

.tianditu-map-fallback {
  width: 100%;
  height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  color: var(--text-secondary);
  text-align: center;
  padding: var(--spacing-lg);
}

.tianditu-map-fallback p {
  margin-bottom: var(--spacing-md);
}

/* Tianditu marker custom styles */
.tianditu-marker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Info window styling */
.tianditu-info-window {
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.tianditu-info-window b {
  color: var(--text-primary);
  font-size: 15px;
}

/* ============================================
   Route Map Page with Integrated Timeline
   ============================================ */

.route-map-page {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.route-timeline {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

/* Ensure timeline inside route page has proper spacing */
.route-timeline .overview-container {
  padding-bottom: 0;
}

.route-timeline .overview-day-tabs {
  margin-bottom: var(--spacing-md);
}

/* Adjust timeline for nested context */
.route-timeline .overview-timeline {
  padding-left: 50px;
}

.route-timeline .overview-timeline-marker {
  left: -50px;
  width: 40px;
}
