/* booking.css — 予約フロー専用スタイル */
:root {
  --accent: #EDAF33;
  --accent-dark: #DD5A12;
  --green: #93BE40;
  --green-dark: #6d9a1e;
  --neutral: #A8AF9F;
  --bg: #f5f0e8;
  --card-bg: #fff;
  --text: #333;
  --text-light: #666;
  --border: #ddd;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "ヒラギノ角ゴ Pro W3", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ヘッダー */
.booking-header {
  background: #fff;
  border-bottom: 3px solid var(--accent);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.booking-header img { height: 36px; }
.booking-header a { text-decoration: none; display: flex; align-items: center; gap: 8px; }
.booking-header .site-name {
  font-size: 14px;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

/* コンテナ */
.booking-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ステップインジケーター */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral);
}
.step.active { color: var(--accent-dark); font-weight: bold; }
.step.done { color: var(--green); }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  background: var(--border);
  color: #fff;
}
.step.active .step-num { background: var(--accent); }
.step.done .step-num { background: var(--green); }
.step-arrow { color: var(--border); margin: 0 4px; }

/* カード共通 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card h2 {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

/* フォーム */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group label .required {
  color: var(--accent-dark);
  font-size: 12px;
  margin-left: 4px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
input[type="date"],
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

/* ボタン */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
  background: var(--neutral);
  cursor: not-allowed;
}
.btn-green {
  background: var(--green);
  color: #fff;
  width: 100%;
}
.btn-green:hover { background: var(--green-dark); }
.btn-back {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border);
  padding: 10px 24px;
  font-size: 14px;
}
.btn-back:hover { border-color: var(--text-light); }

/* 物件カード */
.property-cards {
  display: grid;
  gap: 20px;
}
.property-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.property-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.property-card.unavailable {
  opacity: 0.5;
  pointer-events: none;
}
.property-card-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.property-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 180px;
}
.property-card-info {
  padding: 20px;
}
.property-card-info h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.property-card-info .subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.price-label { font-size: 14px; color: var(--text-light); }
.price-value { font-size: 14px; }
.price-total {
  font-size: 22px;
  font-weight: bold;
  color: var(--accent-dark);
  margin: 8px 0;
}
.savings-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}
.unavailable-badge {
  display: inline-block;
  background: #f8d7da;
  color: #721c24;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}
.select-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.select-btn:hover { background: var(--accent-dark); }

/* 支払い方法 */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.payment-option {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.payment-option:hover { border-color: var(--accent); }
.payment-option.selected {
  border-color: var(--accent);
  background: #fef9ed;
}
.payment-option input[type="radio"] { display: none; }
.payment-option .icon { font-size: 28px; margin-bottom: 6px; }
.payment-option .label { font-size: 14px; font-weight: bold; }

/* キャンセルポリシー */
.cancel-policy {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  font-size: 14px;
}
.cancel-policy h4 { margin-bottom: 8px; }
.cancel-policy ul { margin-left: 20px; }
.cancel-policy li { margin-bottom: 4px; }

/* ローディング */
.loading {
  text-align: center;
  padding: 40px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* エラー */
.error-msg {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* 予約サマリー */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.summary-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.summary-table td:first-child {
  font-weight: bold;
  width: 40%;
  color: var(--text-light);
}
.summary-table .total-row td {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-dark);
  border-top: 2px solid var(--accent);
  border-bottom: none;
}

/* ステップ表示/非表示 */
.step-content { display: none; }
.step-content.active { display: block; }

/* フッター */
.booking-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-size: 13px;
}

/* カレンダー */
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-grid {
  overflow-x: auto;
}

/* 施設フィルター */
.cal-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cal-filter label {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
}
.cal-filter select {
  padding: 6px 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.cal-filter select:focus {
  outline: none;
  border-color: var(--accent);
}
.cal-filter-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-left: auto;
}

/* 凡例（レガシー互換） */
.cal-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-light);
}
.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* 7列グリッド */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

/* 曜日ヘッダー */
.cal-hd {
  background: #f8f4e8;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--text);
}
.cal-hd.sun { color: #d9534f; }
.cal-hd.sat { color: #337ab7; }

/* 日セル */
.cal-day {
  background: #fff;
  padding: 6px 4px;
  min-height: 64px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-day:hover:not(.empty):not(.past) {
  background: #fef9ed;
}
.cal-day.empty {
  background: #fafafa;
  cursor: default;
}
.cal-day.past {
  opacity: 0.35;
  cursor: default;
}

/* 日付番号 */
.cal-day-num {
  font-size: 13px;
  font-weight: bold;
  color: var(--text);
}
.cal-day.sun .cal-day-num,
.cal-day:nth-child(7n+1):not(.cal-hd) .cal-day-num { color: #d9534f; }
.cal-day.sat .cal-day-num,
.cal-day:nth-child(7n):not(.cal-hd) .cal-day-num { color: #337ab7; }

/* 価格表示 */
.cal-day-prices {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cal-price {
  font-size: 10px;
  padding: 1px 3px;
  color: var(--green-dark);
  font-weight: bold;
}
.cal-price.unavail {
  color: #ccc;
  font-weight: normal;
}

/* 選択状態 */
.cal-day.selected-ci {
  background: var(--accent) !important;
}
.cal-day.selected-ci .cal-day-num {
  color: #fff !important;
}
.cal-day.selected-ci .cal-price {
  color: #fff;
}
.cal-day.selected-co {
  background: var(--accent-dark) !important;
}
.cal-day.selected-co .cal-day-num {
  color: #fff !important;
}
.cal-day.selected-co .cal-price {
  color: #fff;
}
.cal-day.selected-range {
  background: #fef3d0 !important;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .property-card-inner {
    grid-template-columns: 1fr;
  }
  .property-card img {
    max-height: 200px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .payment-options {
    grid-template-columns: 1fr;
  }
  .card { padding: 20px; }
  .booking-container { padding: 16px 12px 40px; }
  .cal-day { min-height: 52px; padding: 4px 2px; }
  .cal-day-num { font-size: 11px; }
  .cal-price { font-size: 9px; }
  .cal-hd { font-size: 11px; padding: 6px 2px; }
  .cal-filter-hint { display: none; }
}
