/* =========================================================
   Simple Booking - Front CSS  (FULL REPLACE)
   - カレンダー：スマホでも崩れない（7列固定）
   - フォーム：中央寄せ＆カード風（page-id-88 を優先で適用）
========================================================= */

.sb-booking, .sb-booking * { box-sizing: border-box; }
.sb-booking { max-width: 980px; margin: 0 auto; }

/* ---------------- Toolbar ---------------- */
.sb-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.sb-toolbar button{
  padding:8px 12px;
  border:1px solid #ddd;
  background:#fff;
  border-radius:10px;
  cursor:pointer;
}
.sb-toolbar .is-active{
  border-color:#111;
  font-weight:700;
}
.sb-current{
  margin-left:auto;
  font-weight:800;
}

/* ---------------- Calendar ---------------- */
.sb-calendar{ width:100%; }

/* Week list (7日表示 + スクロールで次週追加) */
.sb-calendar.is-week{
  max-height: 520px;
  overflow: auto;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 8px;
  background: #fff;
}
.sb-weeklist{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sb-week-day{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #e6e6e6;
  background: #fafafa;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}
.sb-week-day.is-available{
  background: #fff;
  border-color: #d7d7d7;
}
.sb-week-day.is-unavailable{
  opacity: .55;
}
.sb-week-left{
  font-weight: 800;
}
.sb-week-right{
  font-weight: 900;
}


/* 7列グリッド */
.sb-grid{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap:10px;
}

/* JSが行(.sb-row)を挟む構造でも、グリッドを壊さない */
.sb-row{ display: contents; }

.sb-cell{ min-width:0; }

/* 曜日ヘッダ */
.sb-cell.sb-h{
  text-align:center;
  font-weight:800;
  padding:10px 6px;
  border-bottom:1px solid #e5e5e5;
  background:transparent;
}

/* 日付セル */
.sb-cell.sb-day{
  border:1px solid #eee;
  background:#fff;
  border-radius:14px;
  padding:10px;
  min-height:78px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.sb-cell.sb-day.is-out{ opacity:.45; }
.sb-cell.sb-day.is-unavailable{ opacity:.35; cursor:not-allowed; }

/* 予約可能日：日付を強調（1.5倍＋太字）＆枠線を薄いピンクで太く */
.sb-cell.sb-day.is-available{
  border:2px solid #f4b6c2;
}
.sb-cell.sb-day.is-available .sb-date{
  font-size:18px;
  font-weight:800;
  opacity:1;
}

.sb-cell.sb-day.is-selected{
  outline:2px solid #111;
  outline-offset:2px;
}

.sb-date{
  font-size:12px;
  opacity:.8;
  line-height:1.2;
}

/* ○ × */
.sb-mark{
  font-size:18px;
  font-weight:900;
  line-height:1;
  margin-top:6px;
}

/* ---------------- Times ---------------- */
.sb-times{ margin-top:18px; }
.sb-times h3{ margin:0 0 10px 0; }

.sb-times-list{ margin-top:10px; }

.sb-time-items{ display:flex; flex-wrap:wrap; gap:10px; }

.sb-time{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer;
}
.sb-time.is-selected{
  border-color:#111;
  font-weight:800;
}

.sb-times-empty{ padding:10px 0; opacity:.8; }

.sb-error{
  padding:12px;
  border:1px solid #f0b4b4;
  background:#fff5f5;
  border-radius:10px;
}

/* =========================================================
   CF7 フォーム：中央寄せ + カード風
   ※ 予約ページを狙い撃ち（page-id-88）して影響を最小化
========================================================= */
body.page-id-88 .wpcf7{
  max-width: 560px;
  margin: 26px auto 0 auto;
}

body.page-id-88 .wpcf7 form{
  background:#fff;
  border-radius:18px;
  padding:26px 22px;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.06);
}

body.page-id-88 .wpcf7 form p{
  margin: 0 0 16px 0;
}

body.page-id-88 .wpcf7 input[type="text"],
body.page-id-88 .wpcf7 input[type="email"],
body.page-id-88 .wpcf7 input[type="tel"],
body.page-id-88 .wpcf7 input[type="number"],
body.page-id-88 .wpcf7 textarea{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px 12px;
  background:#f7f7f7;
  outline:none;
}

body.page-id-88 .wpcf7 input[readonly]{
  background:#f1f5f9;
}

body.page-id-88 .wpcf7 textarea{ min-height:120px; }

body.page-id-88 .wpcf7 input[type="submit"]{
  width:100%;
  border:none;
  border-radius:12px;
  padding:14px 14px;
  font-weight:800;
  cursor:pointer;
}

/* エラー表示 */
body.page-id-88 .wpcf7-not-valid-tip{ font-size:12px; margin-top:6px; }
body.page-id-88 .wpcf7-response-output{ margin:16px 0 0 0; }

/* ---------------- Mobile ---------------- */
@media (max-width: 768px){
  .sb-booking{ padding: 0 10px; }

  .sb-grid{ gap:6px; }

  .sb-cell.sb-day{
    padding:7px;
    min-height:62px;
    border-radius:12px;
  }

  .sb-mark{ font-size:16px; }
  .sb-current{ margin-left:0; }

  body.page-id-88 .wpcf7{
    max-width: 100%;
    margin-left:auto;
    margin-right:auto;
  }
  body.page-id-88 .wpcf7 form{
    padding:20px 16px;
    border-radius:16px;
  }
}


.sb-season-msg{margin:12px 0;padding:10px 12px;border:1px solid #f3b4b4;background:#fff5f5;color:#d60000;font-weight:700;}
