/* assets/form.css (FINAL)
   Shaleny 七五三LP 予約フォーム
   目的：項目/注釈/必須/任意の視覚階層を明確化
   スコープ：.tcbn-reserve 配下のみ（LP他要素に影響なし）
*/

.tcbn-reserve{
  --ink:#1f2937;
  --muted:#6b7280;
  --line:rgba(0,0,0,.10);
  --paper:#fff;
  --bg:#f7f7fb;
  --brand:#F16291;
  --ok:#16a34a;
  --err:#e11d48;
  --radius:16px;
  --shadow:0 18px 55px rgba(0,0,0,.10);

  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color:var(--ink);
}

.tcbn-card{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px 14px;
  box-shadow:none;
}

.tcbn-steps{
  display:flex;
  gap:8px;
  margin:0 0 12px;
}
.tcbn-step{
  flex:1;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 10px;
  background:#fff;
  color:var(--muted);
  font-weight:800;
  font-size:12px;
  line-height:1.1;
}
.tcbn-step span{
  display:block;
  margin-top:4px;
  font-weight:700;
  font-size:11px;
  opacity:.9;
}
.tcbn-step.is-active{
  border-color:rgba(241,98,145,.55);
  background:rgba(241,98,145,.10);
  color:#111;
}

.tcbn-pane{ display:none; }
.tcbn-pane.is-active{ display:block; }

.tcbn-title{
  margin:0 0 6px;
  font-size:18px;
  font-weight:900;
}
.tcbn-lead{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.6;
  font-size:13px;
}

.tcbn-field{ margin:14px 0 0; }

.tcbn-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:13px;
  margin:0 0 8px;
}
.tcbn-req{
  display:inline-block;
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(225,29,72,.10);
  color:var(--err);
  font-weight:900;
}
.tcbn-opt{
  display:inline-block;
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(107,114,128,.12);
  color:var(--muted);
  font-weight:800;
}
.tcbn-hint{
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.tcbn-input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  font-size:16px;
  background:#fff;
}
.tcbn-input:focus{
  outline:2px solid rgba(241,98,145,.35);
  outline-offset:2px;
}
.tcbn-input::placeholder{ color:rgba(0,0,0,.35); }

.tcbn-grid2{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
@media (min-width: 768px){
  .tcbn-grid2{ grid-template-columns:1fr 1fr; }
}

.tcbn-times{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(0,0,0,.02);
  min-height:52px;
}
.tcbn-times .tcbn-time{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:6px 6px 0 0;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:800;
  font-size:13px;
}
.tcbn-times .tcbn-time input{ transform:translateY(1px); }

.tcbn-nav{
  display:flex;
  gap:10px;
  margin-top:16px;
}
.tcbn-btn{
  flex:1;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  background:#fff;
}
.tcbn-btn-sub{ background:#fff; }
.tcbn-btn-primary{
  border-color:rgba(241,98,145,.55);
  background:var(--brand);
  color:#fff;
}
.tcbn-btn[disabled]{ opacity:.6; cursor:not-allowed; }

.tcbn-alert{
  border-radius:14px;
  padding:12px 12px;
  line-height:1.6;
  margin-top:10px;
  font-size:13px;
}
.tcbn-alert-error{
  background:rgba(225,29,72,.08);
  border:1px solid rgba(225,29,72,.20);
  color:#9f1239;
}
.tcbn-alert-ok{
  background:rgba(22,163,74,.08);
  border:1px solid rgba(22,163,74,.20);
  color:#166534;
}

/* ===== STEP3 七五三ヒアリング ===== */
.tcbn-fieldset{
  margin-top:18px;
  padding:14px 14px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  background:rgba(255,255,255,.72);
}
.tcbn-legend{
  font-weight:900;
  font-size:13px;
  padding:0 6px;
}
.tcbn-checkgrid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:10px;
  margin-top:10px;
}
.tcbn-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:#fff;
  font-weight:800;
  line-height:1.4;
}
.tcbn-check input{ margin-top:2px; }

@media (min-width: 768px){
  .tcbn-checkgrid{ grid-template-columns:repeat(3, 1fr); }
}

/* ===== Privacy Policy inside form ===== */
.tcbn-privacy{ margin-top:16px; }
.tcbn-privacy__head{ margin-bottom:10px; }
.tcbn-privacy__ttl{ font-weight:800; }
.tcbn-privacy__details{ margin-top:10px; }
.tcbn-privacy__summary{
  cursor:pointer;
  font-weight:700;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
}
.tcbn-privacy__body{
  margin-top:10px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:12px 12px;
  background:#fff;
  max-height:280px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.tcbn-privacy__agree{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(0,0,0,.03);
}
.tcbn-privacy__agree input{ margin-top:3px; }
#ssrPrivacyBox.is-error .tcbn-privacy__summary,
#ssrPrivacyBox.is-error .tcbn-privacy__agree{
  outline:2px solid rgba(232,75,122,.55);
  outline-offset:2px;
}

/* policy typography */
.tcbn-pp h3{ font-size:16px; margin:0 0 10px; }
.tcbn-pp h4{ font-size:14px; margin:14px 0 8px; }
.tcbn-pp h5{ font-size:13px; margin:12px 0 6px; }
.tcbn-pp p{ margin:0 0 10px; line-height:1.85; }
.tcbn-pp ul, .tcbn-pp ol{ margin:0 0 10px 1.2em; padding:0; line-height:1.85; }
.tcbn-pp li{ margin:0 0 6px; }

/* ===== Time chips (radio) ===== */
.tcbn-reserve .tcbn-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  position:relative;
  z-index:5; /* ←重なり順を安定化（押せない対策） */
}
.tcbn-reserve .tcbn-chip{
  border:1px solid var(--line);
  position:relative;
  z-index:6; /* ←重なり順を安定化（押せない対策） */
  background:var(--paper);
  border-radius:999px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
  transition:transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.tcbn-reserve .tcbn-chip input[type="radio"]{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,.18);
  background:#fff;
  margin:0;
  display:inline-grid;
  place-content:center;
  flex:0 0 auto;
}
.tcbn-reserve .tcbn-chip input[type="radio"]::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  transform:scale(0);
  transition:transform .12s ease;
  background:var(--brand);
}
.tcbn-reserve .tcbn-chip input[type="radio"]:checked{
  border-color:rgba(232,75,122,.55);
  box-shadow:0 0 0 3px rgba(232,75,122,.12);
}
.tcbn-reserve .tcbn-chip input[type="radio"]:checked::before{ transform:scale(1); }

.tcbn-reserve .tcbn-chip:has(input:checked){
  border-color:rgba(232,75,122,.50);
  background:rgba(232,75,122,.06);
  box-shadow:0 10px 22px rgba(232,75,122,.14);
}
.tcbn-reserve .tcbn-chip.is-checked{
  border-color:rgba(232,75,122,.50);
  background:rgba(232,75,122,.06);
  box-shadow:0 10px 22px rgba(232,75,122,.14);
}
.tcbn-reserve .tcbn-chip:active{ transform:translateY(1px); }

/* ===== Calendar ===== */
.tcbn-reserve .tcbn-cal{
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:var(--paper);
  margin-top:6px;
}
.tcbn-reserve .tcbn-cal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.tcbn-reserve .tcbn-cal-title{ font-weight:900; }
.tcbn-reserve .tcbn-cal-nav{
  width:38px;
  height:34px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--paper);
  cursor:pointer;
  font-weight:900;
}

.tcbn-reserve .tcbn-cal-week{
  background:rgba(0,0,0,.02);
  border-bottom:1px solid var(--line);
  padding:6px 8px;
}
.tcbn-reserve .tcbn-cal-grid{
  display:grid !important;
  grid-template-columns:repeat(7,1fr) !important;
  gap:6px !important;
}
.tcbn-reserve .tcbn-cal-w{
  padding:6px 0;
  text-align:center;
  font-weight:900;
  color:var(--muted);
  font-size:12px;
}
.tcbn-reserve .tcbn-cal-w.is-sun{ color:#e11d48; }
.tcbn-reserve .tcbn-cal-w.is-sat{ color:#2563eb; }

.tcbn-reserve .tcbn-cal-days{ padding:10px 10px 14px; }
.tcbn-reserve .tcbn-cal-cell{
  height:48px;
  border-radius:14px;
  border:1px solid transparent;
  background:var(--paper);
  cursor:pointer;
  font-weight:900;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  transition:transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.tcbn-reserve .tcbn-cal-cell:hover{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.02);
}
.tcbn-reserve .tcbn-cal-cell:active{ transform:translateY(1px); }
.tcbn-reserve .tcbn-cal-cell.is-empty{ background:transparent; border:0; cursor:default; }
.tcbn-reserve .tcbn-cal-cell.is-disabled{
  opacity:.28;
  cursor:not-allowed;
  background:rgba(0,0,0,.02);
}
.tcbn-reserve .tcbn-cal-cell.is-selected{
  border-color:rgba(232,75,122,.65);
  background:rgba(232,75,122,.12);
  box-shadow:0 10px 24px rgba(232,75,122,.18);
  transform:translateY(-1px);
}
.tcbn-reserve .tcbn-cal-cell.is-sun .tcbn-cal-num{ color:#e11d48; }
.tcbn-reserve .tcbn-cal-cell.is-sat .tcbn-cal-num{ color:#2563eb; }
.tcbn-reserve .tcbn-cal-num{ font-size:16px; line-height:1; }
.tcbn-reserve .tcbn-cal-dowmini{
  display:block;
  font-size:11px;
  font-weight:800;
  opacity:.65;
  line-height:1;
  margin-top:3px;
}

/* SP: 第1希望 + 必須バッジの崩れ防止 */
.tcbn-pref-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap; /* 念のため */
}

.tcbn-pref-title{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap; /* 長い時だけ折り返す */
}

/* バッジが単独で飛ばないように */
.tcbn-pref-title .tcbn-req,
.tcbn-pref-title .tcbn-opt{
  white-space:nowrap;
}

/* SPではタイトルを1行優先（必要なら2行目へ） */
@media (max-width: 760px){
  .tcbn-pref-title{
    font-size:14px;
    line-height:1.2;
  }
}

/* iOS Safari: button文字が青くなるのを抑止 */
.tcbn-reserve .tcbn-cal button,
.tcbn-reserve .tcbn-cal-cell{
  color: var(--ink) !important;
  -webkit-text-fill-color: currentColor;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

/* 日曜・土曜だけは指定色を優先 */
.tcbn-reserve .tcbn-cal-cell.is-sun{ color:#e11d48 !important; }
.tcbn-reserve .tcbn-cal-cell.is-sat{ color:#2563eb !important; }

/* =========================================
   FIX: テーマ側の header { position:sticky } などを無効化
   「第1希望／必須」がページ最上部に固定される問題対策
========================================= */
.tcbn-reserve header,
.tcbn-reserve .tcbn-pref-head{
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
}

/* 念のため：親がsticky指定されている場合も潰す */
.tcbn-reserve article,
.tcbn-reserve .tcbn-pref{
  position: static !important;
}

/* =================================
   DROP SHADOW REMOVE
   ================================= */

.tcbn-reserve *,
.tcbn-reserve *::before,
.tcbn-reserve *::after{
  box-shadow:none !important;
  text-shadow:none !important;
}

/* =================================
   NEXT/PREV BUTTON CLICK FIX
   下層要素の被り対策
================================= */
.tcbn-reserve .tcbn-nav{
  position: relative;
  z-index: 20;
}

.tcbn-reserve .tcbn-btn,
.tcbn-reserve button[data-next],
.tcbn-reserve button[data-prev]{
  position: relative;
  z-index: 21;
  pointer-events: auto;
}

/* カレンダー・時間選択まわりはボタンより下 */
.tcbn-reserve .tcbn-cal,
.tcbn-reserve .tcbn-cal-head,
.tcbn-reserve .tcbn-cal-week,
.tcbn-reserve .tcbn-cal-days,
.tcbn-reserve .tcbn-cal-grid,
.tcbn-reserve .tcbn-chips{
  position: relative;
  z-index: 1;
}