/* ============================================
   ミナクル 単独予約ページ（TimeRex風）
   ============================================ */

/* --- CSS変数（デザインパターン切り替え用） --- */
:root {
  /* パターンA: ミナクルグリーン（デフォルト） */
  --bk-primary: #26a69a;
  --bk-primary-hover: #00897b;
  --bk-primary-light: #e0f2f1;
  --bk-accent: #26a69a;
  --bk-bg: #f5f5f5;
  --bk-card-bg: #fff;
  --bk-text: #333;
  --bk-text-sub: #666;
  --bk-border: #e0e0e0;
  --bk-radius: 12px;
}

/* パターンB: モダンブルー */
.booking-theme-blue {
  --bk-primary: #3b82f6;
  --bk-primary-hover: #2563eb;
  --bk-primary-light: #eff6ff;
  --bk-accent: #3b82f6;
}

/* パターンC: ダークエレガント */
.booking-theme-dark {
  --bk-primary: #6366f1;
  --bk-primary-hover: #4f46e5;
  --bk-primary-light: #eef2ff;
  --bk-accent: #6366f1;
  --bk-bg: #1a1a2e;
  --bk-card-bg: #16213e;
  --bk-text: #e0e0e0;
  --bk-text-sub: #a0a0a0;
  --bk-border: #2a2a4a;
}

/* --- SWELLテーマのヘッダー・フッター・パンくず等を非表示 --- */
body:has(.booking-page) .l-header,
body:has(.booking-page) .l-fixHeader,
body:has(.booking-page) .p-fixBtnWrap,
body:has(.booking-page) .l-footer,
body:has(.booking-page) .l-scrollTop,
body:has(.booking-page) .l-breadcrumb,
body:has(.booking-page) .c-breadcrumb,
body:has(.booking-page) .c-widget,
body:has(.booking-page) .l-sidebar,
body:has(.booking-page) #fix_bottom_menu,
body:has(.booking-page) .p-fixHeader,
body:has(.booking-page) #wpadminbar,
body:has(.booking-page) .c-pageTitle,
body:has(.booking-page) .p-breadcrumb,
body:has(.booking-page) [class*="breadcrumb"] {
  display: none !important;
}

/* 予約ページでは「日程の希望なし」を非表示 */
.booking-page .mcal-no-pref-label {
  display: none !important;
}

/* body自体にもマージン調整 */
body:has(.booking-page) {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background: var(--bk-bg) !important;
}

/* --- レイアウト --- */
.booking-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 12px 24px;
  background: var(--bk-bg);
}

/* SWELLの余白を徹底的に詰める */
body:has(.booking-page) .l-mainContent,
body:has(.booking-page) .l-main,
body:has(.booking-page) .l-container,
body:has(.booking-page) .l-content,
body:has(.booking-page) .post_content,
body:has(.booking-page) .l-articleBottom,
body:has(.booking-page) .l-mainContent__inner,
body:has(.booking-page) article {
  padding: 0 !important;
  margin: 0 !important;
}

/* --- ヘッダー --- */
.booking-header {
  background: var(--bk-card-bg);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-header__duration {
  display: inline-block;
  background: var(--bk-primary-light);
  color: var(--bk-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.booking-header__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bk-text);
  margin: 0;
}

/* --- ステップインジケーター --- */
.booking-steps {
  display: flex;
  background: var(--bk-card-bg);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  overflow: hidden;
  margin-bottom: 8px;
}

.booking-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  color: var(--bk-text-sub);
  border-right: 1px solid var(--bk-border);
  transition: all 0.3s;
}

.booking-step:last-child {
  border-right: none;
}

.booking-step--active {
  background: var(--bk-primary);
  color: #fff;
  font-weight: 600;
}

.booking-step--done {
  background: var(--bk-primary-light);
  color: var(--bk-primary);
  font-weight: 600;
}

.booking-step__num {
  margin-right: 4px;
}

/* --- セクション --- */
.booking-section {
  background: var(--bk-card-bg);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  padding: 16px;
  margin-bottom: 8px;
}

.booking-section--hidden {
  display: none;
}

.booking-section__guide {
  font-size: 15px;
  color: var(--bk-text);
  margin-bottom: 8px;
}

/* --- ナビゲーションボタン --- */
.booking-nav {
  margin-top: 20px;
  text-align: center;
}

/* --- ボタン共通 --- */
.booking-btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.booking-btn--primary {
  background: var(--bk-primary);
  color: #fff;
}

.booking-btn--primary:hover:not(:disabled) {
  background: var(--bk-primary-hover);
}

.booking-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.booking-btn--submit {
  background: var(--bk-primary);
  color: #fff;
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.booking-btn--submit:hover {
  background: var(--bk-primary-hover);
}

/* --- 日程表示（ステップ2） --- */
.booking-date-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bk-primary-light);
  border: 1px solid var(--bk-border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.booking-date-display__label {
  font-size: 13px;
  color: var(--bk-text-sub);
  margin: 0 0 4px;
}

.booking-date-display__value {
  font-size: 16px;
  font-weight: 700;
  color: var(--bk-text);
  margin: 0;
}

.booking-date-display__tz {
  font-size: 11px;
  color: var(--bk-text-sub);
  margin: 2px 0 0;
}

.booking-date-display__back {
  background: var(--bk-card-bg);
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--bk-text-sub);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.booking-date-display__back:hover {
  background: #f5f5f5;
}

/* --- フォームフィールド --- */
.booking-field {
  margin-bottom: 20px;
}

.booking-field__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--bk-text);
  margin-bottom: 6px;
}

.booking-field__required {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.booking-field__input,
.booking-field__textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  background: var(--bk-card-bg);
  color: var(--bk-text);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.booking-field__input:focus,
.booking-field__textarea:focus {
  outline: none;
  border-color: var(--bk-primary);
  box-shadow: 0 0 0 3px var(--bk-primary-light);
}

.booking-field__input::placeholder,
.booking-field__textarea::placeholder {
  color: #bbb;
}

/* --- プライバシーポリシー スクロールボックス --- */
.booking-privacy__box {
  max-height: 120px;
  overflow-y: auto;
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--bk-text-sub);
  background: #fafafa;
}

.booking-privacy__box h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--bk-text);
  margin: 16px 0 4px;
}

.booking-privacy__box h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--bk-text);
  margin: 8px 0 4px;
}

.booking-privacy__box ul {
  padding-left: 20px;
  margin: 4px 0;
}

.booking-privacy__box li {
  margin: 2px 0;
}

.booking-privacy__box p {
  margin: 4px 0;
}

.booking-privacy__date {
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
}

.booking-privacy__agree {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--bk-text);
  cursor: pointer;
}

.booking-privacy__agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bk-primary);
}

/* --- エラー表示 --- */
.booking-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.booking-errors__item {
  color: #dc2626;
  font-size: 13px;
  margin: 4px 0;
}

/* --- Thanks画面 --- */
.booking-thanks {
  text-align: center;
  padding: 60px 20px;
  background: var(--bk-card-bg);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
}

.booking-thanks__icon {
  margin-bottom: 20px;
}

.booking-thanks__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bk-text);
  margin-bottom: 12px;
}

.booking-thanks__date {
  font-size: 18px;
  font-weight: 700;
  color: var(--bk-primary);
  margin-bottom: 20px;
}

.booking-thanks__text {
  font-size: 14px;
  color: var(--bk-text-sub);
  line-height: 1.8;
}

.booking-thanks__note {
  font-size: 12px;
  color: #999;
  margin-top: 16px;
}

/* --- レスポンシブ --- */
@media (max-width: 600px) {
  .booking-wrapper {
    padding: 4px 8px 24px;
  }

  .booking-header,
  .booking-section {
    padding: 12px;
  }

  .booking-date-display {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .booking-step__label {
    font-size: 12px;
  }

  /* SP上部の余白を徹底排除 */
  body:has(.booking-page) .l-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  body:has(.booking-page) .l-mainContent__bodySection {
    padding-top: 0 !important;
  }
}
