/**
 * BookingSummary 新模塊專用樣式
 * 覆蓋舊系統的網格佈局，使用現代的卡片式設計
 * 
 * 重要：使用多重選擇器確保覆蓋舊系統的所有樣式
 */

/* 預約摘要容器 - 使用多重選擇器強制覆蓋 */
#bookingSummary,
.booking-summary,
.booking-card.booking-summary,
div#bookingSummary.booking-summary {
  /* 不重置網格佈局，讓 booking-section-layout.css 控制網格定位 */
  /* grid-column 和 grid-row 由 booking-section-layout.css 管理 */
  position: relative !important;
  
  /* 使用現代卡片式設計 */
  background: white !important;
  color: #333 !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin-top: 0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e0e0e0 !important;
  
  /* 確保不會覆蓋其他元素 */
  z-index: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* 摘要標題 */
#bookingSummary .card-title,
.booking-summary .card-title {
  font-size: 24px !important;  /* 與選擇日期標題一致 */
  font-weight: 700 !important;
  color: #333 !important;
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid #f5f5f5 !important;
}

/* 摘要副標題 */
#bookingSummary .card-subtitle,
.booking-summary .card-subtitle {
  color: #666 !important;
  opacity: 1 !important;
}

/* 摘要內容區域 */
.summary-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2px;  /* 向下移動 2px */
}

/* 摘要項目 */
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

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

.summary-item-label {
  font-size: 16px;  /* 加大標籤文字 */
  color: #666 !important;
  font-weight: 500;
}

.summary-item-value {
  font-size: 17px;  /* 加大數值文字 */
  color: #333 !important;
  font-weight: 600;
}

/* 價格摘要 */
.price-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #f5f5f5;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.price-item-label {
  font-size: 14px;
  color: #666 !important;
}

.price-item-value {
  font-size: 15px;
  color: #333 !important;
  font-weight: 600;
}

/* 總價 */
.total-price {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;  /* 垂直置中 */
  margin-top: 24px;  /* 往下移，與灰色線保持距離 */
  padding: 16px 20px !important;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%) !important;
  border-radius: 12px !important;
}

.total-price .price-item-label {
  font-size: 18px !important;  /* 略微增大 */
  font-weight: 700;
  color: #333 !important;
}

.total-price .price-item-value {
  font-size: 28px !important;  /* 增大金額顯示 */
  font-weight: 700;
  color: #d32f2f !important;
}

/* 繼續預約按鈕 */
.proceed-booking-btn {
  width: 100%;
  padding: 16px 24px;
  margin-top: 20px;
  background: linear-gradient(135deg, #FC3130 0%, #B43228 100%) !important;
  color: white !important;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(252, 49, 48, 0.3);
}

.proceed-booking-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(252, 49, 48, 0.4);
}

.proceed-booking-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(252, 49, 48, 0.3);
}

.proceed-booking-btn:disabled {
  background: #ccc !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 空狀態 */
.empty-summary {
  text-align: center;
  padding: 32px 16px;
  color: #999 !important;
}

.empty-summary-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-summary-text {
  font-size: 14px;
  color: #999 !important;
}

/* 移動端優化 - 緊湊佈局 */
@media (max-width: 768px) {
  /* 預約摘要容器 - 減少 padding 和 margin */
  #bookingSummary,
  .booking-summary,
  .booking-card.booking-summary {
    padding: 12px 16px !important;
    margin-top: 16px !important;
    border-radius: 12px !important;
  }
  
  /* 標題 - 與其他卡片標題一致 */
  #bookingSummary .card-title,
  .booking-summary .card-title {
    font-size: 20px !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
  }
  
  /* 摘要項目 - 減少 padding 和 margin */
  .summary-item,
  .summary-row {
    padding: 4px 0 !important;
    margin-bottom: 4px !important;
    padding-bottom: 0 !important;
  }
  
  /* 標籤和值 - 適中大小 */
  .summary-item-label,
  .summary-row .summary-label,
  .price-item-label {
    font-size: 15px !important;
  }
  
  .summary-item-value,
  .summary-row .summary-value,
  .price-item-value {
    font-size: 16px !important;
  }
  
  /* 價格摘要 - 減少間距 */
  .price-summary {
    margin-top: 6px !important;
    padding-top: 6px !important;
  }
  
  .price-item {
    padding: 3px 0 !important;
  }
  
  /* 總價 - 適中間距 */
  .total-price {
    margin-top: 10px !important;
    padding: 10px 14px !important;
  }
  
  .total-price .price-item-label {
    font-size: 16px !important;
  }
  
  .total-price .price-item-value {
    font-size: 22px !important;
  }
  
  /* 繼續預約按鈕 - 減少 padding 和 margin */
  .proceed-booking-btn {
    padding: 10px 14px !important;
    margin-top: 10px !important;
    font-size: 14px !important;
  }
  
  /* 摘要內容區域 - 減少 gap 和 margin */
  .summary-content {
    gap: 8px !important;
    margin-top: 8px !important;
  }
  
  /* 摘要分隔線 - 減少 margin */
  .summary-divider {
    margin: 8px 0 !important;
  }
  
  /* 摘要總計 - 減少 margin */
  .summary-total {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
}

/* 小屏幕進一步優化 */
@media (max-width: 480px) {
  /* 預約摘要容器 - 進一步減少 padding */
  #bookingSummary,
  .booking-summary,
  .booking-card.booking-summary {
    padding: 10px 14px !important;
    margin-top: 12px !important;
  }
  
  /* 標題 - 與其他卡片標題一致 */
  #bookingSummary .card-title,
  .booking-summary .card-title {
    font-size: 20px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }
  
  /* 摘要項目 - 進一步減少 padding 和 margin */
  .summary-item,
  .summary-row {
    padding: 3px 0 !important;
    margin-bottom: 3px !important;
    padding-bottom: 0 !important;
  }
  
  /* 標籤和值 - 小屏幕適中大小 */
  .summary-item-label,
  .summary-row .summary-label,
  .price-item-label {
    font-size: 15px !important;
  }
  
  .summary-item-value,
  .summary-row .summary-value,
  .price-item-value {
    font-size: 16px !important;
  }
  
  /* 價格摘要 - 進一步減少間距 */
  .price-summary {
    margin-top: 4px !important;
    padding-top: 4px !important;
  }
  
  .price-item {
    padding: 2px 0 !important;
  }
  
  /* 總價 - 小屏幕適中間距 */
  .total-price {
    margin-top: 8px !important;
    padding: 10px 14px !important;
  }
  
  .total-price .price-item-label {
    font-size: 16px !important;
  }
  
  .total-price .price-item-value {
    font-size: 22px !important;
  }
  
  /* 繼續預約按鈕 - 進一步減少 padding 和 margin */
  .proceed-booking-btn {
    padding: 10px 14px !important;
    margin-top: 8px !important;
    font-size: 13px !important;
  }
  
  /* 摘要內容區域 - 進一步減少 gap 和 margin */
  .summary-content {
    gap: 6px !important;
    margin-top: 6px !important;
  }
  
  /* 摘要分隔線 - 進一步減少 margin */
  .summary-divider {
    margin: 6px 0 !important;
  }
  
  /* 摘要總計 - 進一步減少 margin */
  .summary-total {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
  }
  
  /* 單行顯示 */
  .summary-item,
  .price-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

/* 超小屏幕（iPhone SE 等）- 極致緊湊 */
@media (max-width: 375px) {
  /* 預約摘要容器 - 極致緊湊 */
  #bookingSummary,
  .booking-summary,
  .booking-card.booking-summary {
    padding: 8px 12px !important;
    margin-top: 10px !important;
  }
  
  /* 標題 - 與其他卡片標題一致 */
  #bookingSummary .card-title,
  .booking-summary .card-title {
    font-size: 20px !important;
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
  }
  
  /* 摘要項目 - 極致緊湊 */
  .summary-item,
  .summary-row {
    padding: 2px 0 !important;
    margin-bottom: 2px !important;
    padding-bottom: 0 !important;
  }
  
  /* 價格摘要 - 極致緊湊 */
  .price-summary {
    margin-top: 3px !important;
    padding-top: 3px !important;
  }
  
  .price-item {
    padding: 1px 0 !important;
  }
  
  /* 總價 - 極致緊湊 */
  .total-price {
    margin-top: 6px !important;
    padding: 8px 12px !important;
  }
  
  .total-price .price-item-value {
    font-size: 20px !important;
  }
  
  /* 繼續預約按鈕 - 極致緊湊 */
  .proceed-booking-btn {
    padding: 9px 12px !important;
    margin-top: 6px !important;
    font-size: 13px !important;
  }
  
  /* 摘要內容區域 - 極致緊湊 */
  .summary-content {
    gap: 5px !important;
    margin-top: 5px !important;
  }
  
  /* 摘要分隔線 - 極致緊湊 */
  .summary-divider {
    margin: 5px 0 !important;
  }
  
  /* 摘要總計 - 極致緊湊 */
  .summary-total {
    margin-top: 6px !important;
    margin-bottom: 6px !important;
  }
}

