/* =====================================================================
   estimate.css — 見積もりシミュレーションページ (estimate.html) 専用
   - common.css の後に読み込む
   - ルート `.estimate-page` スコープ + `es-` 接頭辞で他ページと名前空間を分ける
   - レイアウトは通常フロー（ブロックを margin-top で積む）。
     セクション内部の装飾配置のみ絶対配置を使用
   ===================================================================== */

/* デザインのヘッダーは 111px（うち約56pxがステータスバー）。
   実装のヘッダーは 55px なので、以降の座標はデザイン値から 56px 引いた値で積む */

.estimate-page .footer {
  margin-top: 90px;
  /* 画面下部に固定した「選択中」バーのぶん、下を空ける */
  padding-bottom: 104px;
}

/* 手順をひとかたまりにする入れ物。スマホでは箱を作らない（PC は estimate-pc.css で左の列にする） */
.es-main { display: contents; }

/* =============== 背景装飾 =============== */
/* デザイン上の位置は left:-199 / top:-175。実装はヘッダーが56px低いぶん上へずらす */
.es-decor {
  position: absolute;
  left: -199px;
  top: -231px;
  width: 808px;
  height: 2822px;
  z-index: 0;
  pointer-events: none;
}
.es-decor img { width: 100%; height: 100%; }

/* 以降のコンテンツは背景装飾より前面に置く */
.es-summary,
.es-title,
.es-date,
.es-times,
.es-time-note,
.es-options,
.es-submit,
.es-line {
  position: relative;
  z-index: 1;
}

/* =============== 画面下部に固定する「選択中」バー =============== */
/* .fv-cta-stage / .fv-cta-sticky（common.css）に乗せている。
   stage の高さはフッター下端まで common.js が伸ばすので、
   ここでは sticky の止まる位置＝バーの高さぶんだけ指定する */
.es-bar-sticky {
  /* 画面下からバーの高さぶん上に貼り付ける。
     オプション明細を開くと高さが変わるので、estimate.js が測って上書きする */
  top: calc(min(var(--vh, 100vh), 852px) - 104px);
}

.es-bar {
  position: relative;
  width: 390px;
  padding: 12px 0 16px;
}

/* ---- カードの上の行（戻るボタン／「選択中」／オプションを表示） ---- */
.es-bar__head {
  position: relative;
  width: 92%;
  height: 21px;
  margin: 0 auto;
}

.es-bar__label {
  position: absolute;
  left: 29px;
  top: 0;
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 1;
  color: #000;
}

/* カード右上に半分かぶさるチップ。カードより後ろに置かれないよう z-index を上げる */
.es-bar__back {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: #d9d9d9;
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 1;
  color: #000;
  white-space: nowrap;
  cursor: pointer;
}
.es-bar__back:disabled { opacity: 0.45; cursor: default; }

/* 「オプションを表示」。「選択中」と同じ位置に、入れ替わりで出す */
.es-bar__toggle {
  position: absolute;
  z-index: 2;
  left: 29px;
  top: 0;
  height: 21px;
  padding: 0 9px;
  /* 後ろのカードに文字が重なって読みにくいので、金額カードと同じ白を敷く */
  border: 1px solid #fff;
  border-radius: 5px;
  background: rgba(244, 242, 240, 0.94);
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 19px;
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  cursor: pointer;
}
.es-bar__toggle::after {
  content: '▾';
  margin-left: 4px;
  text-decoration: none;
  display: inline-block;
}
.es-bar__toggle[aria-expanded="true"]::after { content: '▴'; }

/* ---- 金額カード ---- */
.es-bar__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 92%;
  height: 48px;
  margin: -10px auto 0;
  padding: 0 24px 0 29px;
  border: 1px solid #fff;
  border-radius: 32px;
  background: rgba(244, 242, 240, 0.94);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}

.es-bar__name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: #5e5e5e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 日時は文字数が多いので少し詰める */
.es-bar__name--long {
  font-size: 13px;
  letter-spacing: 0;
}

.es-bar__price {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
}
.es-summary__yen { font-size: 12px; }
.es-summary__num { font-size: 19px; letter-spacing: 0.5px; }
.es-summary__tax { font-size: 8px; font-weight: 500; }

/* 未選択のあいだはグレーで示す */
.es-bar.is-empty .es-bar__name { color: #a49a97; }

/* 「オプションを表示」が出ているあいだは「選択中」を引っ込める */
.es-bar.has-options .es-bar__label { display: none; }

/* ---- 「オプションを表示」で開く明細 ---- */
.es-bar__list {
  width: 92%;
  max-height: 168px;
  margin: 0 auto 10px;
  padding: 12px 24px 12px 29px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: rgba(244, 242, 240, 0.94);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}
.es-bar__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-zenmaru);
  font-size: 12px;
  line-height: 1.9;
  color: var(--dark);
}
.es-bar__item span:last-child {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--pink);
}

/* =============== ページタイトル =============== */
/* 背景装飾と同じベージュ（#e4d6b7）のトーン・オン・トーン。
   1文字ずつ inline-block にして、弧に沿うよう rotate と translateY を当てている */
.es-title {
  height: 30px;
  margin: 96px 0 0 39px;
  font-family: var(--font-pocchi);
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
  color: #e4d6b7;
  white-space: nowrap;
}
.es-title span {
  display: inline-block;
  width: 16px;
  text-align: center;
}
.es-title span:nth-child(1)  { transform: translateY(0)      rotate(2deg); }
.es-title span:nth-child(2)  { transform: translateY(1px)    rotate(1deg); }
.es-title span:nth-child(3)  { transform: translateY(2px)    rotate(0); }
.es-title span:nth-child(4)  { transform: translateY(1px)    rotate(-2deg); }
.es-title span:nth-child(5)  { transform: translateY(1px)    rotate(-4deg); }
.es-title span:nth-child(6)  { transform: translateY(-1px)   rotate(-6deg); }
.es-title span:nth-child(7)  { transform: translateY(-3px)   rotate(-8deg); }
.es-title span:nth-child(8)  { transform: translateY(-5px)   rotate(-10deg); }
.es-title span:nth-child(9)  { transform: translateY(-9px)   rotate(-12deg); }
.es-title span:nth-child(10) { transform: translateY(-12px)  rotate(-15deg); }
.es-title span:nth-child(11) { transform: translateY(-17px)  rotate(-17deg); }
.es-title span:nth-child(12) { transform: translateY(-22px)  rotate(-19deg); }

/* =============== 日付選択 =============== */
.es-date {
  margin-top: 9px;
}

.es-date__heading {
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--dark);
  text-align: center;
}

.es-date__selects {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

/* ---- セレクトボックス（年月・アルバムの商品／サイズで共用） ---- */
.es-select {
  position: relative;
  width: 86px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
}
.es-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: var(--font-zenmaru);
  font-size: 20px;
  line-height: 1;
  color: #000;
  cursor: pointer;
}
.es-select__arrow {
  position: absolute;
  left: 69px;
  top: 12px;
  width: 9px;
  height: 6px;
  pointer-events: none;
}
.es-select__suffix {
  position: absolute;
  left: 36px;
  top: 8px;
  font-family: var(--font-zenmaru);
  font-size: 13px;
  line-height: 1;
  color: #000;
  pointer-events: none;
}
/* 月は数字を右寄せして「月」の直前に置く */
.es-select--month select { padding: 0 52px 0 6px; text-align: right; }
.es-select--year select  { padding: 0 26px 0 11px; }

/* ---- カレンダー ---- */
/* デザインはセル43.43px＋横5px／縦8pxの間隔。実装は割り切れる44px＋横4px／縦8pxにした
   （7列で 44*7 + 4*6 = 332px、デザインの334pxとほぼ同じ） */
/* 曜日の見出し行。カレンダー本体と同じ列幅にして縦をそろえる */
.es-cal__head {
  display: grid;
  grid-template-columns: repeat(7, 44px);
  gap: 4px;
  width: 332px;
  margin: 33px auto 0;
}
.es-cal__wd {
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  color: var(--dark);
}
.es-cal__wd--sun { color: #d16660; }
.es-cal__wd--sat { color: #5b86b3; }

/* 空き状況の読み込み中・失敗の表示（カレンダーの上） */
.es-cal__status {
  width: 320px;
  margin: 18px auto 0;
  font-family: var(--font-zenmaru);
  font-size: 12px;
  line-height: 1.7;
  color: #7d7472;
  text-align: center;
}
.es-cal__status[hidden] { display: none; }
.es-cal__status.is-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdf1f0;
  color: #c0392b;
  text-align: left;
}

.es-cal {
  display: grid;
  grid-template-columns: repeat(7, 44px);
  gap: 8px 4px;
  width: 332px;
  margin: 7px auto 0;
}

.es-cal__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: #fff;
  font-family: var(--font-zenmaru);
  cursor: pointer;
}

.es-cal__num {
  font-size: 14px;
  line-height: 1;
  color: var(--dark);
}
.es-cal__mark { width: 11px; height: 11px; }
.es-cal__mark--tri { width: 12px; height: 11px; }
.es-cal__state {
  font-size: 7px;
  line-height: 1;
  color: var(--dark);
}

.es-cal__cell--few  { background: #fff7e9; }
.es-cal__cell--full { background: #666; cursor: default; }
.es-cal__cell--off  { background: #aaa; cursor: default; }

/* 日曜・土曜の日付の色。背景が濃い「満席」「選択不可」は読みにくくなるので対象外 */
.es-cal__cell--sun:not(.es-cal__cell--full):not(.es-cal__cell--off) .es-cal__num { color: #d16660; }
.es-cal__cell--sat:not(.es-cal__cell--full):not(.es-cal__cell--off) .es-cal__num { color: #5b86b3; }

.es-cal__cell--selected {
  background: #d16660;
  box-shadow: inset 1px 1px 3px 1px rgba(0, 0, 0, 0.25);
}
.es-cal__cell--selected .es-cal__num,
.es-cal__cell--selected .es-cal__state { color: var(--bg-color); }
.es-cal__cell--selected .es-cal__mark { display: none; }

/* ---- 凡例（デザインには無いが、○▲満 の意味が伝わらないため追加） ---- */
.es-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  list-style: none;
}

/* 休日料金の予告。カレンダーの下、凡例のさらに下に置く */
.es-cal__note {
  width: 291px;
  margin: 12px auto 0;
  font-family: var(--font-zenmaru);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.6;
  color: #8b807c;
  text-align: center;
}
.es-legend li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-zenmaru);
  font-size: 10px;
  color: var(--dark);
}
.es-legend img { width: 11px; height: 11px; }
.es-legend__full {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: #666;
  font-size: 7px;
  color: var(--bg-color);
}

/* =============== 時間選択 =============== */
.es-times {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin-top: 62px;
}

.es-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 324px;
  height: 76px;
  padding: 0 22px 0 48px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 2px 1px 5px rgba(0, 0, 0, 0.25);
  font-family: var(--font-zenmaru);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.es-time__slot,
.es-time__state {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--dark);
  white-space: nowrap;
}

/* 左側。時刻の下に、ずれの理由が入ることがある */
.es-time__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.es-time__shift {
  font-weight: 500;
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0;
  color: #8a7f7c;
  text-align: left;
}

.es-time__status {
  display: flex;
  align-items: center;
  gap: 16px;
}
.es-time__mark { width: 16px; height: 16px; }
.es-time__x {
  width: 16px;
  font-size: 15px;
  line-height: 1;
  color: var(--dark);
  text-align: center;
}

.es-time--full {
  opacity: 0.55;
  cursor: default;
}

@media (hover: hover) {
  .es-time:not(.es-time--full):hover { border-color: #d16660; }
}
.es-time.is-touched  { border-color: #d16660; }
.es-time.is-selected { border-color: #d16660; }

/* 日付を選ぶまでは時間帯を出さない */
.es-times:empty { display: none; }

/* オプションで撮影時間が延びるときだけ出る注意書き */
.es-time-note {
  width: 299px;
  margin: 12px auto 0;
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 1.6;
  color: var(--dark);
  text-align: center;
}

/* =============== オプション =============== */
.es-options {
  margin-top: 66px;
}

.es-options__head { text-align: center; }

.es-options__ja {
  font-family: var(--font-zenmaru);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: #000;
}
.es-options__en {
  margin-top: 12px;
  font-family: var(--font-zenmaru);
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 11px;
  /* letter-spacing は最後の文字の後ろにも入るので、その分だけ右へ寄る。字下げで打ち消す */
  text-indent: 11px;
  color: #000;
}
.es-options__arrow {
  display: block;
  width: 0;
  height: 0;
  margin: 20px auto 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #222;
}

.es-opt {
  position: relative;
  width: 299px;
  margin: 15px auto 0;
  padding: 31px 18px 13px 24px;
  border: 2px solid transparent;
  border-radius: 32px;
  background: rgba(244, 242, 240, 0.57);
  box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.31);
  transition: border-color 0.2s ease;
  cursor: pointer;
}

.es-opt__name {
  margin-left: 10px;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: var(--dark);
}

.es-opt__desc {
  margin: 11px 0 0 10px;
  width: 236px;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.7;
  color: #000;
}

/* オプションの見出し。デザインには無いが、PDFの実データに差し替えて
   14項目になったため、PDFと同じ区分けで小見出しを入れている */
.es-opt-group {
  width: 299px;
  margin: 30px auto 0;
  padding-left: 10px;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1px;
  color: #8b807c;
}
.es-opt-group + .es-opt { margin-top: 10px; }

.es-opt__foot {
  display: flex;
  align-items: center;
  /* ヘルプの「？」を置いていたので space-between だったが、
     押しても何も起きないボタンなので外した。金額だけを右に寄せる */
  justify-content: flex-end;
  margin-top: 15px;
}

.es-opt__price {
  display: flex;
  align-items: baseline;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--pink);
  white-space: nowrap;
}
.es-opt__yen { font-size: 12px; }
.es-opt__tax { font-size: 8px; font-weight: 500; }
/* ペット同伴だけ金額が無い */
.es-opt__price--free { font-size: 16px; }

@media (hover: hover) {
  .es-opt:hover { border-color: #c64a8a; }
}
.es-opt.is-touched  { border-color: #c64a8a; }
.es-opt.is-selected { border-color: #c64a8a; }

.es-opt__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============== 予約へ進む =============== */
.es-submit {
  margin-top: 72px;
}

.es-submit__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 299px;
  height: 48px;
  margin: 0 auto;
  padding: 0 18px 0 20px;
  border: 1px solid #fff;
  border-radius: 32px;
  background: var(--pink);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s ease;
}

/* 日付と時間が決まるまでは押せない（プランページの .pp-sim__btn と同じ扱い） */
.es-submit__btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.es-submit__text {
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}
.es-submit__price {
  display: flex;
  align-items: baseline;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  white-space: nowrap;
}
.es-submit__price .es-summary__yen,
.es-submit__price .es-summary__num,
.es-submit__price .es-summary__tax { color: #fff; }

.es-submit__note {
  margin: 10px 0 0 64px;
  font-family: var(--font-zenmaru);
  font-size: 11px;
  line-height: 1;
  color: #000;
}

/* =============== LINE相談 =============== */
.es-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 33px;
}
.es-line__logo { width: 56px; height: 56px; }
.es-line__label {
  margin-top: 9px;
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--dark);
}

/* =============== 撮影メニュー・プランの選択 =============== */
/* ここから直接来た人向けの最初のステップ。
   プランが決まるまで、以降（日付・時間・オプション・合計）は出さない */
.es-pick {
  position: relative;
  z-index: 1;
  margin-top: 9px;
}

.es-pick__heading {
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--dark);
  text-align: center;
}

.es-pick__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
}

.es-pick__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 299px;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  font-family: var(--font-zenmaru);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--dark);
  text-align: left;
  transition: border-color 0.2s ease;
}
@media (hover: hover) {
  .es-pick__btn:hover { border-color: #c64a8a; }
}
.es-pick__btn.is-touched,
.es-pick__btn.is-selected { border-color: #c64a8a; }

/* コースの行に出す金額 */
.es-pick__price {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--pink);
  white-space: nowrap;
}
.es-pick__price small {
  font-weight: 500;
  font-size: 9px;
}

/* 撮影メニューを選ぶまではコースを出さない */
.es-pick__courses { margin-top: 34px; }

/* プランが決まるまで、以降のステップは隠す */
.estimate-page.is-picking .es-date,
.estimate-page.is-picking .es-times,
.estimate-page.is-picking .es-time-note,
.estimate-page.is-picking .es-options,
.estimate-page.is-picking .es-submit,
.estimate-page.is-picking .es-line {
  display: none;
}
