/* 2026-04-22 Phase 6-D: booking-confirm.css の :root 上書きを削除し、
   fps-unified-ui.php 側のトークン (--fps-ui-*) を直接参照するよう変更。
   fallback 値はレガシーブラウザ/mu-plugin 未ロード時の保険として残置。 */

/* Phase 6 (2026-04-19): お支払い (/checkout/order-pay/) と幅・パディングを統一
 * - max-width 690 → 760px（お支払いページと共通）
 * - padding 16 → 28px（左右余白を統一、モバイルのみ 16px 維持） */
.fps-confirm-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: var(--fps-ui-text, #3A3A32);
  line-height: 1.7;
  font-size: 15px;
}

/* Progress */
.fps-progress {
  display: flex; justify-content: center; align-items: center; gap: 0;
  padding: 16px 0; margin-bottom: 8px;
}
.fps-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fps-ui-text-light, #7A7A6A); }
.fps-step.active { color: var(--fps-ui-olive, #86866C); font-weight: 700; }
.fps-step.done   { color: var(--fps-ui-olive-light, #A8A890); }
.fps-step-num {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid var(--fps-ui-text-light, #7A7A6A); color: var(--fps-ui-text-light, #7A7A6A);
}
.fps-step.active .fps-step-num { background: var(--fps-ui-olive, #86866C); color: var(--fps-ui-white, #FFFFFF); border-color: var(--fps-ui-olive, #86866C); }
.fps-step.done .fps-step-num   { background: var(--fps-ui-olive-light, #A8A890); color: var(--fps-ui-white, #FFFFFF); border-color: var(--fps-ui-olive-light, #A8A890); }
.fps-step-arrow { margin: 0 8px; color: #ccc; font-size: 14px; }

/* Card */
.fps-card {
  background: var(--fps-ui-white, #FFFFFF); border-radius: var(--fps-ui-radius-md, 12px);
  border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); margin-bottom: 16px;
  overflow: hidden; box-shadow: var(--fps-ui-shadow-md, 0 4px 20px rgba(26,26,23,.06));
}
.fps-card-hd {
  padding: 14px 18px; font-weight: 700; font-size: 15px;
  border-bottom: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); background: #faf9f6;
  display: flex; align-items: center; gap: 8px;
}
.fps-card-hd .icon { font-size: 18px; display: inline-flex; align-items: center; color: var(--fps-ui-olive, #5a6b3a); }
.fps-card-hd .icon svg { width: 20px; height: 20px; display: block; }
.fps-card-bd { padding: 18px; }

/* Badge */
.fps-badge-req { display: inline-block; background: var(--fps-ui-error, #B85450); color: var(--fps-ui-white, #FFFFFF); font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 600; margin-left: 6px; }
.fps-badge-opt { display: inline-block; color: var(--fps-ui-text-light, #7A7A6A); font-size: 11px; padding: 1px 6px; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-radius: 4px; margin-left: 6px; }

/* Summary */
.fps-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.fps-summary .lb { color: var(--fps-ui-text-light, #7A7A6A); white-space: nowrap; }
.fps-summary .vl { font-weight: 600; }

/* Options grid */
.fps-opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fps-opt-card {
  border: 2px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-radius: 10px; padding: 12px; text-align: center;
  transition: all 0.2s;
}
.fps-opt-card.has-qty { border-color: var(--fps-ui-olive, #86866C); background: #f0efe8; }
.fps-opt-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.fps-opt-price { font-size: 13px; color: var(--fps-ui-text-light, #7A7A6A); }
.fps-opt-qty {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px;
}
.fps-opt-qty button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18));
  background: var(--fps-ui-white, #FFFFFF); cursor: pointer; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: all 0.15s;
}
.fps-opt-qty button:active { background: #eee; transform: scale(0.95); }
.fps-opt-qty .qty-val { font-weight: 700; min-width: 24px; text-align: center; font-size: 16px; }

/* Coupon */
.fps-coupon-row { display: flex; gap: 8px; margin-top: 8px; }
.fps-coupon-input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-radius: 8px;
  font-size: 14px; outline: none;
}
.fps-coupon-input:focus { border-color: var(--fps-ui-olive, #86866C); }
.fps-coupon-btn {
  padding: 10px 16px; background: var(--fps-ui-white, #FFFFFF); border: 1px solid var(--fps-ui-olive, #86866C);
  color: var(--fps-ui-olive, #86866C); border-radius: 8px; font-weight: 600; cursor: pointer;
  font-size: 14px; white-space: nowrap;
}
.fps-coupon-btn:hover { background: var(--fps-ui-cream, #FAF8F5); }
.fps-coupon-msg { font-size: 13px; margin-top: 6px; min-height: 18px; }
.fps-coupon-note { font-size: 12px; color: var(--fps-ui-text-light, #7A7A6A); margin-top: 4px; }

/* Quote */
.fps-quote-area { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); }
.fps-q-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.fps-q-total {
  display: flex; justify-content: space-between; padding: 10px 0 0;
  font-size: 17px; font-weight: 700; border-top: 2px solid var(--fps-ui-dark, #1A1A17); margin-top: 6px;
}
.fps-q-tax { font-size: 12px; color: var(--fps-ui-text-light, #7A7A6A); text-align: right; margin-top: 4px; }

/* Guest table */
.fps-guest-note { font-size: 13px; color: var(--fps-ui-text-light, #7A7A6A); margin-bottom: 12px; line-height: 1.6; }
.fps-guest-tbl { width: 100%; border-collapse: collapse; }
.fps-guest-tbl th {
  font-size: 13px; font-weight: 600; color: var(--fps-ui-text-light, #7A7A6A); padding: 8px 4px;
  text-align: center; border-bottom: 2px solid var(--fps-ui-border, rgba(134,134,108,.18));
}
.fps-guest-tbl th:first-child { text-align: left; }
.fps-guest-tbl td {
  padding: 10px 4px; text-align: center; border-bottom: 1px solid #f0ede8;
}
.fps-guest-tbl td:first-child { text-align: left; font-weight: 600; font-size: 14px; }
.fps-guest-cell { display: inline-flex; align-items: center; gap: 4px; }
.fps-guest-select {
  width: 60px; padding: 8px 4px; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-radius: 8px;
  font-size: 15px; font-weight: 600; text-align: center; outline: none;
  background: var(--fps-ui-white, #FFFFFF); appearance: auto; cursor: pointer;
}
.fps-guest-select:focus { border-color: var(--fps-ui-olive, #86866C); box-shadow: 0 0 0 2px rgba(134,134,108,0.15); }
.fps-guest-unit { font-size: 13px; color: var(--fps-ui-text-light, #7A7A6A); }

/* Shake animation for validation */
@keyframes fps-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.fps-card.fps-shake { animation: fps-shake 0.5s ease-in-out; }
.fps-card.fps-invalid { border-color: var(--fps-ui-error, #B85450); box-shadow: 0 0 0 2px rgba(192,57,43,0.15); }

/* Terms scroll hint banner */
.fps-terms-scroll-hint {
  display: flex; align-items: center; gap: 6px;
  background: #fff8e6; border: 1px solid #f0d78c; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; color: #8a6d00; font-weight: 600;
  margin-bottom: 10px; transition: opacity 0.3s;
}
.fps-terms-scroll-hint .hint-icon { font-size: 16px; flex-shrink: 0; display: inline-flex; align-items: center; color: #b88c00; }
.fps-terms-scroll-hint .hint-icon svg { width: 16px; height: 16px; display: block; }
.fps-guest-total-row td { font-weight: 700; border-top: 2px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-bottom: none; padding-top: 12px; }
.fps-guest-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--fps-ui-olive, #86866C); color: var(--fps-ui-white, #FFFFFF);
  padding: 3px 12px; border-radius: 20px; font-size: 15px; font-weight: 700;
}
.fps-guest-badge.over-limit { background: var(--fps-ui-error, #B85450); }
.fps-guest-warn { font-size: 12px; color: var(--fps-ui-gold, #C9A96E); font-weight: 600; margin-top: 8px; }
.fps-guest-error { font-size: 13px; color: var(--fps-ui-error, #B85450); font-weight: 600; margin-top: 8px; }
.fps-under10 {
  background: #fff0f0; border: 1px solid #e0b0b0; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: #8a4a4a; margin-top: 10px; line-height: 1.6;
}

/* Notes */
.fps-notes-ta {
  width: 100%; min-height: 80px; padding: 12px; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18));
  border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical;
  outline: none; line-height: 1.6;
}
.fps-notes-ta:focus { border-color: var(--fps-ui-olive, #86866C); box-shadow: 0 0 0 2px rgba(134,134,108,0.15); }

/* Terms */
.fps-terms-box {
  max-height: 200px; overflow-y: auto; border: 1px solid var(--fps-ui-border, rgba(134,134,108,.18)); border-radius: 8px;
  padding: 14px; font-size: 13px; line-height: 1.8; background: #faf9f6; margin-bottom: 12px;
}
.fps-terms-box ul { padding-left: 1.2em; }
.fps-terms-box li { margin-bottom: 6px; }
.fps-terms-check {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #f0efe8; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all 0.2s;
}
.fps-terms-check.unlocked { animation: fps-glow 1.5s ease; }
@keyframes fps-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(134,134,108,0.5); }
}
.fps-terms-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--fps-ui-olive, #86866C); }
.fps-terms-hint { color: var(--fps-ui-gold, #C9A96E); font-size: 13px; font-weight: 600; margin-top: 8px; }

/* Actions — ベースは unified-ui (.fps-ui-btn / .fps-ui-btn-secondary) に委譲。
   ここでは Booking Confirm 固有のレイアウト（横幅フレックス・無効状態）のみ定義する。 */
.fps-actions { display: flex; gap: 12px; margin-top: 8px; margin-bottom: 40px; }
.fps-actions .fps-ui-btn,
.fps-actions .fps-ui-btn-secondary {
  flex: 1;
}
/* 未入力時の「お支払いへ」ボタンは視覚的にフェードさせつつ、クリック可能のままにして
   shakeAndScroll で欠けている項目にユーザーを誘導する（ボタン自体は disabled にしない）。 */
.fc-btn-next.is-inactive { opacity: 0.45; }
.fc-btn-next.is-inactive:hover { transform: none !important; }
/* 旧クラス fps-btn-inactive の互換（将来削除可） */
.fc-btn-next.fps-btn-inactive { opacity: 0.45; }
.fc-btn-next.fps-btn-inactive:hover { transform: none !important; }

/* VIP credit */
.fps-vip-credit {
  background: linear-gradient(135deg, #f8f0e6, #f5ece0); border: 1px solid #e0cdb8;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
}
.fps-vip-badge { background: var(--fps-ui-gold, #C9A96E); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }

/* Error banner */
.fps-error-banner {
  background: #fff0f0; border: 1px solid #e0b0b0; border-radius: 8px;
  padding: 16px; text-align: center; color: var(--fps-ui-error, #B85450); font-weight: 600;
}

/* 締切超過バナー (2026-04-22): 初回ロード時 or お支払いボタン押下時に表示 */
.fps-cutoff-banner {
  display: none;
  margin: 8px 0 16px;
  padding: 16px 18px;
  background: #fff3e0;
  border: 2px solid #e0b070;
  border-radius: 12px;
  color: #6b4a20;
  font-weight: 600;
  text-align: center;
  animation: fps-cutoff-pulse 0.5s ease;
}
.fps-cutoff-banner.is-visible { display: block; }
.fps-cutoff-banner__msg { margin-bottom: 12px; line-height: 1.6; }
.fps-cutoff-banner__back {
  display: inline-block;
  min-width: 200px;
  text-decoration: none;
}
@keyframes fps-cutoff-pulse {
  0%   { transform: scale(0.98); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
  .fps-opt-grid { gap: 8px; }
  .fps-confirm-wrap { padding: 12px; }
  .fps-card-bd { padding: 14px; }
  .fps-guest-select { width: 52px; }
}
