/**
 * 預約區域完全重新設計
 * 版本: 3.0
 * 日期: 2025-11-07
 * 
 * 設計理念:
 * - 清晰的視覺層次
 * - 現代化的卡片設計
 * - 完美的響應式佈局
 * - 流暢的交互體驗
 */

/* ========================================
   預約區域 - 主容器
   ======================================== */

.booking-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  padding: 80px 0 !important;
  min-height: 100vh !important;
}

.booking-section .container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* 標題區域 */
.booking-section .section-title {
  font-size: 42px !important;
  font-weight: 800 !important;
  color: #212529 !important;
  text-align: center !important;
  margin-bottom: 16px !important;
  letter-spacing: -0.5px !important;
}

.booking-section .section-subtitle {
  font-size: 18px !important;
  color: #6c757d !important;
  text-align: center !important;
  margin-bottom: 48px !important;
  font-weight: 400 !important;
}

/* ========================================
   場地選擇器
   ======================================== */

.location-selector {
  margin-bottom: 40px !important;
  /* Removed card styling - venue cards display directly */
}

/* ========================================
   預約容器 - 網格佈局
   ======================================== */

/* DISABLED: Duplicate definition, using modules/booking-section-layout.css instead */
/*
.booking-container {
  display: grid !important;
  grid-template-columns: 1fr 380px !important;
  gap: 24px !important;
  align-items: start !important;
}
*/

/* ========================================
   左側主要內容區域
   ======================================== */

.booking-main-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

/* ========================================
   卡片基礎樣式
   ======================================== */

.booking-card {
  background: white !important;
  border-radius: 16px !important;
  padding: 32px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s ease !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.booking-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
}

/* 卡片標題 */
.booking-card .card-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #212529 !important;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* 步驟編號基本樣式 */
.booking-card .card-title::before {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  background: linear-gradient(135deg, #FC3130 0%, #d32f2f 100%) !important;
  color: white !important;
  border-radius: 50% !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

/* 為每個卡片指定固定編號 */
.booking-card:nth-child(1) .card-title::before {
  content: '1' !important;
}

.booking-card:nth-child(2) .card-title::before {
  content: '2' !important;
}

.booking-card:nth-child(3) .card-title::before {
  content: '3' !important;
}

/* 預約摘要卡片不顯示編號 */
.booking-card.booking-summary .card-title::before {
  display: none !important;
}

/* 完成狀態的卡片顯示綠色打勾 */
.booking-card.completed .card-title::before {
  content: '✓' !important;
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
  color: white !important;
}

/* 卡片副標題 */
.booking-card .card-subtitle {
  font-size: 15px !important;
  color: #6c757d !important;
  margin-bottom: 24px !important;
  line-height: 1.6 !important;
}

/* ========================================
   日期選擇器
   ======================================== */

.date-selector {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  gap: 12px !important;
}

.date-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 12px !important;
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  min-height: 90px !important;
}

.date-btn:hover {
  background: #fff !important;
  border-color: #d32f2f !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.15) !important;
}

.date-btn.selected {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
  border-color: #d32f2f !important;
  color: white !important;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.3) !important;
}

.date-btn.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #f8f9fa !important;
}

.date-btn.disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: #e9ecef !important;
}

/* 日期文字 */
.date-day {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  opacity: 0.8 !important;
}

.date-number {
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.date-month {
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
  opacity: 0.7 !important;
}

/* ========================================
   時段選擇器容器
   ======================================== */

.time-slots-container {
  width: 100% !important;
}

/* 時段頭部 */
.timeslot-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 20px !important;
  background: #f8f9fa !important;
  border-radius: 12px !important;
  margin-bottom: 20px !important;
  border: 1px solid #e9ecef !important;
}

.timeslot-hint {
  font-size: 15px !important;
  color: #6c757d !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.selected-range-display {
  font-size: 15px !important;
  color: #212529 !important;
  font-weight: 600 !important;
  margin: 0 !important;
  flex: 1 !important;
}

.selected-range-display strong {
  color: #d32f2f !important;
  font-size: 16px !important;
}

.clear-selection-btn {
  background: white !important;
  border: 2px solid #d32f2f !important;
  color: #d32f2f !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.clear-selection-btn:hover {
  background: #d32f2f !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25) !important;
}

/* 時段網格 */
.time-slots-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 12px !important;
}

/* 時段按鈕 */
.time-slot-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 12px !important;
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  min-height: 85px !important;
}

/* Hover 效果已移除 - 避免滑鼠懸停時按鈕變白色 */

.time-slot-btn.selected {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
  border-color: #d32f2f !important;
  color: white !important;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.3) !important;
}

.time-slot-btn.booked,
.time-slot-btn:disabled {
  background: #f8f9fa !important;
  border-color: #e9ecef !important;
  color: #adb5bd !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
}

/* Booked/disabled hover 效果已移除 */

.time-slot-time {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
  line-height: 1.2 !important;
}

.time-slot-price {
  font-size: 14px !important;
  font-weight: 600 !important;
  opacity: 0.85 !important;
}

.time-slot-btn.selected .time-slot-time,
.time-slot-btn.selected .time-slot-price {
  color: white !important;
}

/* ========================================
   預約摘要 - Sticky 側邊欄
   ======================================== */

/* DISABLED: Duplicate definition, using modules/booking-section-layout.css instead */
/*
.booking-summary {
  position: sticky !important;
  top: 100px !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  background: white !important;
  border: 2px solid #e9ecef !important;
}
*/

.booking-summary::-webkit-scrollbar {
  width: 6px !important;
}

.booking-summary::-webkit-scrollbar-track {
  background: #f8f9fa !important;
  border-radius: 3px !important;
}

.booking-summary::-webkit-scrollbar-thumb {
  background: #d32f2f !important;
  border-radius: 3px !important;
}

/* 摘要內容 */
.summary-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.summary-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 8px 0 !important;  /* 減少 padding */
  border-bottom: 1px solid #f8f9fa !important;
}

/* 手機版進一步減少 padding */
@media (max-width: 768px) {
  .summary-row {
    padding: 4px 0 !important;
  }
}

.summary-label {
  font-size: 15px !important;
  color: #6c757d !important;
  font-weight: 500 !important;
}

.summary-value {
  font-size: 15px !important;
  color: #212529 !important;
  font-weight: 600 !important;
  text-align: right !important;
}

.summary-divider {
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #e9ecef, transparent) !important;
  margin: 8px 0 !important;
}

/* 價格顯示 */
.summary-pricing {
  background: #f8f9fa !important;
  padding: 20px !important;
  border-radius: 12px !important;
  margin-top: 16px !important;
}

.summary-total {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #d32f2f !important;
  margin-top: 12px !important;
  padding: 12px 20px 0 20px !important;
  border-top: 2px solid #dee2e6 !important;
}

/* 繼續按鈕 */
.summary-action {
  margin-top: 24px !important;
}

.summary-action .btn {
  width: 100% !important;
  padding: 16px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
  color: white !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.3) !important;
}

.summary-action .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4) !important;
}

.summary-action .btn:disabled {
  background: #e9ecef !important;
  color: #adb5bd !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* ========================================
   響應式設計 - 平板
   ======================================== */

@media (max-width: 1200px) {
  .booking-container {
    grid-template-columns: 1fr 340px !important;
    gap: 20px !important;
  }
  
  .booking-card {
    padding: 28px !important;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  }
}

@media (max-width: 1024px) {
  .booking-section {
    padding: 60px 0 !important;
  }
  
  .booking-section .section-title {
    font-size: 36px !important;
  }
  
  .booking-container {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  .booking-summary {
    position: relative !important;
    top: 0 !important;
    max-height: none !important;
    order: 3 !important;
  }
  
  .date-selector {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  }
}

/* ========================================
   響應式設計 - 手機
   ======================================== */

@media (max-width: 768px) {
  .booking-section {
    padding: 40px 0 !important;
  }
  
  .booking-section .container {
    padding: 0 16px !important;
  }
  
  .booking-section .section-title {
    font-size: 32px !important;
    margin-bottom: 12px !important;
  }
  
  .booking-section .section-subtitle {
    font-size: 16px !important;
    margin-bottom: 32px !important;
  }
  
  .location-selector {
    /* Removed padding - venue cards display directly */
    margin-bottom: 24px !important;
  }
  
  /* 統一三個預約卡片收合狀態時的高度，以 2 號卡片為標準 */
  .booking-card.collapsed:not(.booking-summary) {
    min-height: 160px !important;
    max-height: 160px !important;
    overflow: hidden !important;
  }
  
  /* 展開狀態時允許高度自動調整 */
  .booking-card:not(.collapsed):not(.booking-summary) {
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .booking-card {
    padding: 24px !important;
    border-radius: 12px !important;
  }
  
  .booking-card .card-title {
    font-size: 20px !important;
  }
  
  .booking-card .card-subtitle {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }
  
  .date-selector {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 10px !important;
  }
  
  .date-btn {
    min-height: 80px !important;
    padding: 14px 10px !important;
  }
  
  .date-number {
    font-size: 24px !important;
  }
  
  .timeslot-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  
  .clear-selection-btn {
    width: 100% !important;
    padding: 10px 16px !important;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    gap: 10px !important;
  }
  
  .time-slot-btn {
    min-height: 75px !important;
    padding: 14px 10px !important;
  }
  
  .time-slot-time {
    font-size: 15px !important;
  }
  
  .time-slot-price {
    font-size: 13px !important;
  }
  
  .summary-total {
    font-size: 20px !important;
  }
  
  .summary-action .btn {
    padding: 14px !important;
    font-size: 16px !important;
  }
}

/* ========================================
   響應式設計 - 小屏幕
   ======================================== */

@media (max-width: 480px) {
  .booking-section .section-title {
    font-size: 28px !important;
  }
  
  .booking-section .section-subtitle {
    font-size: 15px !important;
  }
  
  .booking-card {
    padding: 20px !important;
  }
  
  .booking-card .card-title {
    font-size: 18px !important;
  }
  
  .date-selector {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  .date-btn {
    min-height: 75px !important;
    padding: 12px 8px !important;
  }
  
  .date-number {
    font-size: 22px !important;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  
  .time-slot-btn {
    min-height: 70px !important;
    padding: 12px 8px !important;
  }
  
  .time-slot-time {
    font-size: 14px !important;
  }
  
  .time-slot-price {
    font-size: 12px !important;
  }
}

/* ========================================
   動畫和過渡
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.booking-card {
  animation: fadeInUp 0.5s ease forwards !important;
}

.booking-card:nth-child(1) {
  animation-delay: 0.1s !important;
}

.booking-card:nth-child(2) {
  animation-delay: 0.2s !important;
}

.booking-card:nth-child(3) {
  animation-delay: 0.3s !important;
}

/* ========================================
   可訪問性
   ======================================== */

.date-btn:focus-visible,
.time-slot-btn:focus-visible {
  outline: 3px solid #d32f2f !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  .booking-card:hover,
  .date-btn:hover,
  .time-slot-btn:hover {
    transform: none !important;
  }
}

