/* VESTA ウェブ予約（/yoyaku/）2026リデザイン Phase B
   page-2026.css の後に読み込む。予約システムの既存クラス名（.container / .form-group / .calendar-grid /
   .time-cell / .popup / .submit-btn など）を新デザインで描き直すためのファイル。
   ⚠️ クラス名・IDは js/script.js と confirm.php のスクリプトが参照しているので改名しないこと。
   フラットデザイン／グラデーション不使用。色は site-2026.css の :root トークンを使う。 */

/* 予約ページ自体なので、スマホ下部の「ウェブ予約」バーは出さない（自分自身への導線になるため） */
.v-dock { display: none !important; }

/* ========= ページ共通の器 =========
   confirm / complete / cancel / manage が使っている .container を、
   固定ヘッダーの下に収まる白カードとして描く */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
main.y-main { padding: 116px var(--pad) clamp(56px, 8vw, 96px); }
main.y-main > .container { margin-inline: auto; }
@media (max-width: 900px) { main.y-main { padding-top: 96px; } }
@media (max-width: 560px) {
  main.y-main { padding-inline: 16px; }
  .container { padding: 22px 18px; border-radius: 20px; }
}

/* ページ内の見出しブロック（旧 <header><h1>VESTA 大開通店</h1> の置き換え）
   ※ 素の header 要素にはスタイルを当てない。共通ヘッダー .v-hdr に当たってしまうため */
.y-head { margin-bottom: 26px }
.y-head .eyebrow { margin-bottom: 6px }
.y-head h1 {
  font-family: var(--f-head); font-weight: 900;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.4;
}
.y-head h1 .kicker {
  display: block; font-family: var(--f-body); font-size: .84rem; font-weight: 700;
  letter-spacing: .08em; color: var(--brand); margin-bottom: 4px;
}
.y-head h2 {
  font-family: var(--f-head); font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.45; margin-top: 12px;
}
.y-head p { color: var(--sub); margin-top: 8px }
.mk-o { color: var(--red); font-weight: 700 }
.tlink { color: var(--red); font-weight: 700 }
.y-step {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; background: var(--wood-l); color: var(--sub);
}

/* ========= フォーム ========= */
.form-group { margin-bottom: 22px }
.form-group > label {
  display: block; font-family: var(--f-head); font-weight: 700;
  font-size: .95rem; margin-bottom: 8px; color: var(--ink);
}
.form-group .req {
  font-size: .7rem; font-weight: 700; color: #fff; background: var(--red);
  border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: 2px;
}
.form-hint { color: var(--sub); font-size: .84rem; margin: -2px 0 10px }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"],
select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;               /* iOSで拡大されないよう16px以上を維持 */
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  transition: border-color .2s, background .2s;
}
textarea { min-height: 130px; resize: vertical }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--red); background: var(--paper);
}
input::placeholder, textarea::placeholder { color: #b3a698 }
input.invalid, select.invalid, textarea.invalid { border-color: var(--red); background: #fdf3f2 }

select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%236f6259'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 22px;
}

.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
@media (max-width: 480px) { .name-fields { grid-template-columns: 1fr; gap: 0 } }

.validation-message { color: var(--red); font-size: .84rem; font-weight: 700; margin-top: 6px }

/* チェックボックス */
.checkbox-container {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--wood-l); border-radius: 16px; padding: 16px 18px; margin-top: 14px;
}
.checkbox-container input[type="checkbox"] {
  width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--red); cursor: pointer;
}
.checkbox-container label { font-weight: 700; font-size: .92rem; cursor: pointer; margin: 0 }

/* ========= ボタン ========= */
.button-group, .button-container { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px }
.button-group { justify-content: center }

.submit-btn, .verify-btn, .cancel-btn, .back-btn, .back-button,
.popup-buttons button, #today-btn {
  font: inherit; font-weight: 700; line-height: 1.4;
  border: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  text-decoration: none; transition: background .25s, color .25s, border-color .25s;
}
/* 主ボタン（赤） */
.submit-btn, .cancel-btn, #submit-btn {
  background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--brand);
  padding: 15px 34px; font-size: 1rem;
}
.submit-btn:hover, .cancel-btn:hover, #submit-btn:hover { background: var(--brand) }
#submit-btn:disabled { background: #cbbfb2; box-shadow: none; cursor: not-allowed }
.button-group .submit-btn { min-width: 260px }
/* 副ボタン（白＋枠線） */
.back-btn, .back-button, #back-btn, .verify-btn {
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink);
  padding: 13px 26px; font-size: .95rem;
}
.back-btn:hover, .back-button:hover, #back-btn:hover, .verify-btn:hover {
  background: var(--ink); color: var(--cream);
}

/* ========= コース詳細（index） ========= */
.course-details { margin: 18px 0 6px }
.course-detail {
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px 22px; margin-bottom: 12px;
}
.course-detail h3 { font-family: var(--f-head); font-weight: 900; font-size: 1.1rem; line-height: 1.5 }
.course-detail .price {
  display: inline-block; font-family: var(--f-latin); font-weight: 700; font-size: 1.3rem;
  color: var(--red); margin: 6px 0 4px;
}
.course-detail .description { color: var(--sub); font-size: .92rem }
.course-image-container {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px;
  background: var(--wood); margin-top: 14px;
}
.course-image { width: 100%; height: 100%; object-fit: cover }

/* ========= カレンダー =========
   display:table の骨格は script.js の生成構造に合わせてそのまま使う（改造しない） */
.calendar-header {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--brand); color: #fff;
  padding: 10px 12px; border-radius: 999px; margin-bottom: 14px;
}
#date-range { font-family: var(--f-head); font-weight: 700; font-size: .98rem; text-align: center; flex: 1 }
#prev-week, #next-week {
  background: rgba(255, 255, 255, .16); border: 0; color: #fff; font: inherit; font-size: .86rem;
  font-weight: 700; cursor: pointer; padding: 9px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  transition: background .2s;
}
#prev-week:hover, #next-week:hover { background: rgba(255, 255, 255, .3) }
#today-btn {
  background: var(--paper); color: var(--brand); border: 1.5px solid var(--line);
  padding: 8px 18px; font-size: .86rem; margin: 0 0 14px;
}
#today-btn:hover { background: var(--wood-l) }

.calendar-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 8px }
.calendar-grid {
  display: table; width: 100%; border-collapse: collapse; table-layout: fixed;
  background: var(--paper); border-radius: 18px; overflow: hidden;
}
.week-day { display: table-row; text-align: center; background: var(--wood-l) }
.week-day span {
  display: table-cell; padding: 9px 4px; width: calc(100% / 7);
  font-family: var(--f-head); font-weight: 700; font-size: .82rem; color: var(--sub);
}
.date-row { display: table-row; text-align: center; background: var(--cream) }
.date-cell {
  display: table-cell; padding: 8px 4px; border-bottom: 1px solid var(--line); width: 14.28%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .84rem; font-weight: 700; color: var(--ink);
}
.time-row { display: table-row }
.time-cell {
  display: table-cell; padding: 11px 0; text-align: center;
  border: 1px solid var(--line); width: 12.5%; height: 34px;
  vertical-align: middle; position: relative; font-size: .88rem;
}
.time-label {
  font-family: var(--f-latin); font-weight: 700; background: var(--wood-l); color: var(--ink);
  width: auto; min-width: 62px; white-space: nowrap; font-size: .9rem;
}
.saturday { color: #2f6fb0 }
.sunday   { color: var(--red) }
.today-column { background: #fffaf0 }

/* 空き状況の記号 */
.available { cursor: pointer; transition: background .15s }
.available:hover { background: var(--wood-l) }
.available::before {
  content: ""; display: block; width: 19px; height: 19px;
  border: 2px solid var(--red); border-radius: 50%;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.unavailable::before,
.closed::before {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #bcae9f; font-weight: 700;
}
.unavailable::before { content: "×" }
.closed::before { content: "−" }

/* 電話予約が必要な枠 */
.tel-required { cursor: pointer; background: var(--wood-l) !important }
.tel-required::before { content: none !important }
.tel-link {
  color: var(--brand) !important; font-weight: 700; text-decoration: none; font-size: .8rem;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap;
}
.tel-link:hover { text-decoration: underline }

/* 凡例 */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px;
  color: var(--sub); font-size: .84rem;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px }
.cal-legend i { font-style: normal; font-weight: 700; color: var(--ink) }
.cal-legend .mk-o { color: var(--red) }

@media (max-width: 600px) {
  .calendar-container { margin-inline: -6px }
  .calendar-grid { min-width: 550px }
  .time-cell { font-size: .8rem; padding: 10px 0 }
  #prev-week, #next-week { padding: 9px 10px; font-size: .8rem }
}

/* ========= ポップアップ（確認・最終確認） ========= */
.popup {
  position: fixed; inset: 0; background: rgba(32, 22, 18, .8);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.popup.hidden { display: none }
.popup-content {
  background: var(--paper); border-radius: var(--r); padding: clamp(24px, 4vw, 34px);
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
}
.popup-content h3 {
  font-family: var(--f-head); font-weight: 900; font-size: 1.25rem;
  margin-bottom: 14px; text-align: center;
}
.popup-content p { margin-bottom: 6px }
#reservation-summary p, .popup-content > p {
  background: var(--cream); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: .94rem;
}
.popup-buttons { display: flex; gap: 12px; margin-top: 22px }
.popup-buttons button { flex: 1; padding: 14px 10px; font-size: .95rem }

/* SMS認証 */
#verification-area {
  background: var(--wood-l); border-radius: 18px; padding: 18px; margin-top: 18px; text-align: center;
}
#verification-area .verify-btn { width: 100%; background: var(--paper) }
#code-input-area { margin-top: 12px }
#verification-code { text-align: center; letter-spacing: .3em; font-family: var(--f-latin); margin-bottom: 10px }
#verification-status { font-size: .86rem; font-weight: 700; margin-top: 8px }

/* ========= 予約内容・結果表示（confirm / complete / cancel / manage） ========= */
.reservation-details {
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px 22px; margin-bottom: 26px;
}
.reservation-details h3 {
  font-family: var(--f-head); font-weight: 900; font-size: 1.05rem; margin-bottom: 10px;
}
.reservation-details p { font-size: .95rem }
.reservation-details p + p { margin-top: 2px }
.reservation-id {
  display: inline-block; font-family: var(--f-latin); font-weight: 700; font-size: 1.05rem;
  background: var(--brand); color: #fff; border-radius: 999px; padding: 6px 18px; margin-bottom: 12px;
}
.detail-row { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 9px 0 }
.detail-row + .detail-row { border-top: 1px dashed var(--line) }
.detail-label { font-family: var(--f-head); font-weight: 700; min-width: 7em; color: var(--sub) }

/* 完了ページ */
.complete-container { text-align: center }
.complete-icon {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 2.2rem; line-height: 76px;
}
.complete-container .reservation-details { text-align: left; margin-top: 24px }
.email-notice {
  background: var(--wood-l); border-radius: 18px; padding: 18px 20px;
  font-size: .9rem; color: var(--sub); text-align: left;
}
.notes { margin: 22px 0; color: var(--sub); font-size: .92rem }
.notes a { color: var(--red); font-weight: 700 }

/* 注意・警告・結果メッセージ */
.notice, .warning-box, .change-notice, .success-message, .error-message, .debug-info {
  border-radius: 18px; padding: 18px 20px; margin: 18px 0;
}
.notice { background: var(--wood-l); color: var(--ink) }
.warning-box { background: #fdf3f2; border: 1px solid #f0cfcc; color: var(--brand) }
.warning-box p { font-weight: 700 }
.change-notice { background: var(--cream); border: 1px solid var(--line) }
.change-notice h3 { font-family: var(--f-head); font-weight: 900; font-size: 1rem; margin-bottom: 6px }
.change-notice a { color: var(--red); font-weight: 700 }
.success-message { background: var(--wood-l); border: 1px solid var(--line); font-weight: 700 }
.error-message { background: #fdf3f2; border: 1px solid #f0cfcc; color: var(--brand); font-weight: 700 }
.debug-info { background: var(--wood-l); font-size: .78rem; color: var(--sub) }
.notice h3 { font-family: var(--f-head); font-weight: 900; font-size: 1rem; margin-bottom: 6px }

.cancel-container h3, .manage-container h3 {
  font-family: var(--f-head); font-weight: 900; font-size: 1.1rem; margin-bottom: 12px;
}

/* ========= 汎用 ========= */
.hidden { display: none !important }
