/********************************************************
既存スタイル
*********************************************************/
/* リセットCSS */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* レイアウト */
.section {
  min-height: 100vh;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* 左側（フォーム） */
.left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.left-wrap {
  width: 100%;
  max-width: 400px;
}

/* 右側（背景画像） */
.right {
  flex: 1;
  position: relative;
  display: none;
}

@media (min-width: 992px) {
  .right {
    display: block;
  }
}

.bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

/* ロゴ */
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.logo-image {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
}

/* フォーム要素 */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.field:focus {
  outline: none;
  border-color: #FB5F67;
}

/* パスワード表示切り替え */
.password-field {
  position: relative;
}

.show-password {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.show-password input {
  display: none;
}

.show-password label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #64748b;
}

.show-password label::before {
  content: '';
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.show-password input:checked + label::before {
  background-color: #FB5F67;
  border-color: #FB5F67;
}

/* リンクとボタン */
.forgot-password {
  text-align: right;
  margin-bottom: 1rem;
}

.forgot-password a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.forgot-password a:hover {
  color: #FB5F67;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.button-primary {
  background-color: #017BFE;
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: #e54850;
  opacity: 1;
}

.button-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  opacity: 0.6;
}

.button-secondary {
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  text-decoration: none;
}

.button-secondary:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}


/********************************************************
体験予約スタイル
*********************************************************/

/* 基本レイアウト */
.booking-content {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* ステップインジケーター */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding: 0 20px;
}

.step {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.step.active {
  color: #fb5f67;
  font-weight: 500;
}

/* カレンダーセクション */
.calendar-section {
  margin: 20px 0;
}

.month-selector {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.month-button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.calendar {
  border-radius: 4px;
  padding: 15px;
  background: #fff;
  min-height: 300px;
}

/* 時間枠セクション */
.time-slots {
  margin: 20px 0;
}

.time-slot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-slot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  transition: all 0.3s ease;
}

.time-slot-item.selected {
  border-color: #fb5f67;
  background: #fff5f5;
}

.time-slot-info {
  flex: 1;
}

.time-container {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.time {
  font-size: 18px;
  font-weight: bold;
  min-width: 60px;
  text-align: left;
}

.slot-name {
  color: #333;
  flex: 1;
}

.select-button {
  padding: 8px 16px;
  border: 1px solid #fb5f67;
  border-radius: 4px;
  background: #fff;
  color: #fb5f67;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-button:hover {
  background: #f0f8ff;
}

.select-button.selected {
  background: #fb5f67;
  color: #fff;
}

/* 確認セクション */
.confirmation-section {
  margin: 20px 0;
}

.confirmation-section h2 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #333;
  font-weight: 400;
}

.confirmation-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin: 10px 0;
}

.confirmation-group {
  margin-bottom: 20px;
}

.confirmation-group h3 {
  font-size: 15px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
  font-weight: 500;
  color: #333;
}

.confirmation-item {
  display: flex;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.confirmation-item .label {
  width: 100px;
  color: #666;
  font-weight: 400;
  flex-shrink: 0;
  white-space: nowrap;
}

.confirmation-item .value {
  flex: 1;
  color: #333;
  font-weight: 500;
  white-space: nowrap;  /* 折り返さない */
  overflow: hidden;
  text-overflow: ellipsis;  /* 長すぎる場合は...で省略 */
  text-align: right;
}

/* フォーム要素 */
.form-field {
  margin-bottom: 20px;
}

/* 横並びフィールドグループ（姓名、ふりがな用） */
.double-field-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 20px;
}

.double-field-group .form-field {
  flex: 1;
  margin-bottom: 0;
}

.form-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 400;
}

.required {
  color: #e74c3c;
  margin-left: 3px;
}

.field {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.field:focus {
  border-color: #fb5f67;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 同意セクション */
.agreement-section {
  margin: 20px 0;
  padding: 15px 5px;
  font-size: 15px;
}

.agreement-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* 完了メッセージ */
.completion-message {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
}

.message-icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  background: #28a745;
  color: white;
  font-size: 30px;
  margin: 0 auto 20px;
}

.completion-message h2 {
  color: #28a745;
  margin-bottom: 10px;
}

/* メール通知 */
.email-notice {
  margin: 20px 0;
  padding: 15px;
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 4px;
  color: #1976d2;
}

/* ボタン */
.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.button {
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: #fb5f67;
  color: white;
}

.button-secondary {
  background: #fff;
  border: 1px solid #ddd;
}

/* 注意事項 */
.notice {
  margin-top: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.notice h3 {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 500;
  color: #333;
}

.notice ul {
  padding-left: 20px;
}

.notice li {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .step-indicator {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .time-slot-item {
    padding: 12px;
  }

  .time {
    font-size: 16px;
    min-width: 50px;
  }

  .slot-name {
    font-size: 14px;
  }

  .select-button {
    padding: 6px 12px;
    white-space: nowrap;
  }

  .confirmation-item {
    flex-direction: column;
    gap: 5px;
  }

  .label {
    width: 100%;
  }

  .button-group {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .button {
    width: 100%;
  }
}


/********************************************************
カレンダースタイル
*********************************************************/
/* カレンダー関連のスタイル */
.calendar-section {
  margin: 20px 0;
}

.month-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 10px;
}

.current-month {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.month-button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.month-button:hover {
  background: #f0f8ff;
}

.calendar {
  border-radius: 4px;
  background: #fff;
  padding: 15px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.calendar-header div {
  padding: 5px;
  font-size: 15px;
  font-weight: 400;
}

.calendar-header div:first-child {
  color: #e74c3c; /* 日曜日の色 */
}

.calendar-header div:last-child {
  color: #3498db; /* 土曜日の色 */
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.calendar-day:hover:not(.disabled) {
  background: #fff5f5;
  border-color: #fb5f67;
}

.calendar-day.today {
  background: #fbbf24 !important;
  border-radius: 50% !important;
  font-weight: bold;
  color: #fff !important;
  position: relative;
  opacity: 1 !important;
  cursor: default !important;
}

.calendar-day.today.sunday,
.calendar-day.today.weekend {
  color: #fff;
}

.calendar-day.selected {
  background: #FB5F67 !important;
  border: 2px solid #FB5F67 !important;
  color: #fff !important;
  font-weight: bold;
}

.calendar-day.selected:hover {
  background: #e54850 !important;
  border-color: #e54850 !important;
}

/* 今日かつ予約可能な日（todayを優先） */
.calendar-day.available-day.today,
.calendar-day.today.available-day {
  background: #fbbf24 !important;
  border: 2px solid #f59e0b !important;
  border-radius: 50% !important;
  color: #fff !important;
}

/* 今日かつ予約不可の日でも丸い形を維持 */
.calendar-day.today.disabled {
  background: #d1d5db !important;
  border-radius: 50% !important;
  color: #fff !important;
  opacity: 0.7 !important;
  pointer-events: none;
}

/* 選択された今日の日付 */
.calendar-day.today.selected {
  background: #FB5F67 !important;
  border: 2px solid #FB5F67 !important;
  border-radius: 8px !important;  /* 選択されたら四角に戻る */
  color: #fff !important;
}

.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
  border: 1px solid transparent;
  opacity: 0.8;
}

.calendar-day.weekend {
  color: #3498db;
}

.calendar-day.sunday {
  color: #e74c3c;
}

.calendar-day.selected.sunday {
  color: #e74c3c;
}

.calendar-day.selected.weekend {
  color: #3498db;
}

.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #fb5f67;
  border-radius: 50%;
}




/********************************************************
ルーム選択のスタイル
*********************************************************/
.room-selection {
  margin: 2rem 0;
}

.room-selection h2 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.room-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.room-option {
  display: block;
  cursor: pointer;
}

.room-option input[type="radio"] {
  display: none;
}

.room-button {
  display: block;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.room-option input[type="radio"]:checked + .room-button {
  border-color: #4A90E2;
  background-color: #F5F9FF;
}

.room-name {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.room-description {
  display: block;
  font-size: 0.9rem;
  color: #666;
}

.room-button:hover {
  border-color: #4A90E2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 店舗選択のスタイル */
.store-selection {
  margin: 2rem 0;
}

.store-selection h2 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  pointer-events: none;
}

.store-select {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  font-size: 1rem;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.store-select:hover {
  border-color: #4A90E2;
}

.store-select:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

/*予約可能な時間*/
.time-slots h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #333;
}


/* 予約内容確認のスタイル */
.reservation-summary {
  margin: 2rem 0;
}

.reservation-summary h2 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #333;
  font-weight: 400;
}

.summary-box {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.summary-item {
  display: flex;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-item:first-child {
  padding-top: 0;
}

.summary-item .label {
  width: 100px;
  color: #666;
  font-weight: 400;
  flex-shrink: 0;
}

.summary-item .value {
  flex: 1;
  color: #333;
  font-weight: 500;
  text-align: right;
}

.any {
  padding: 0 3px;
  border: solid 1px #aaa;
  color: #aaa;
  border-radius: 3px;
  box-sizing: border-box;
  font-size: 0.8rem;
}

.required {
  padding: 0 3px;
  background-color: #ea734d;
  color: #fff;
  border-radius: 3px;
  box-sizing: border-box;
  font-size: 0.8rem;
}





/* ======= 影響範囲を限定するための親コンテナ ======= */
.custom-radio-container, .custom-checkbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

.custom-radio-group, .custom-checkbox-group {
  display: flex;
  gap: 12px;
}

/* ======= 共通ボタンスタイル（ラジオ & チェックボックス） ======= */
.custom-radio-label, .custom-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 40px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  border: 2px solid #999;
  background-color: #fff;
  color: #333;
}

/* ======= ラジオボタン専用スタイル（影響範囲を制限） ======= */
.custom-radio-group input[type="radio"] {
  display: none;
}
.custom-radio-group input[type="radio"]:checked + .custom-radio-label {
  background-color: #46ADAC;
  color: #fff;
  border-color: #46ADAC;
}

/* ======= チェックボックス専用スタイル（影響範囲を制限） ======= */
.custom-checkbox-group input[type="checkbox"] {
  display: none;
}
.custom-checkbox-group input[type="checkbox"]:checked + .custom-checkbox-label {
  background-color: #46ADAC;
  color: #fff;
  border-color: #46ADAC;
}


.calendar-day.available-day:not(.today) {
  border: 2px solid #4ade80;
  background: #f0fdf4;
  box-sizing: border-box; /* 枠線分でレイアウトが崩れにくくする */
}

/* 選択可能な日が選択された時 */
.calendar-day.available-day.selected {
  background: #FB5F67 !important;
  border: 2px solid #FB5F67 !important;
  color: #fff !important;
}




/* モバイル対応 */
@media (max-width: 768px) {
  .calendar-day {
    font-size: 14px;
    padding: 5px;
  }

  .month-selector {
    padding: 0 5px;
  }

  .month-button {
    padding: 6px 12px;
    font-size: 14px;
  }

  .current-month {
    font-size: 16px;
  }

  .store-select {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .summary-box {
    padding: 1rem;
  }

  .summary-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .summary-item .label {
    width: 100%;
  }

  /* 横並びフィールドはモバイルでも維持 */
  .double-field-group {
    flex-direction: row;
    gap: 0.5rem;
  }

  .double-field-group .form-field {
    flex: 1;
    min-width: 0; /* flexアイテムが縮小できるように */
  }

  /* モバイルでのラベルとプレースホルダーの調整 */
  .double-field-group .form-field label {
    font-size: 11px;
  }

  .double-field-group .field {
    font-size: 16px; /* iOSのズーム防止 */
    padding: 10px 12px;
  }

}

/********************************************************
追加スタイル - フォーム改善
*********************************************************/

/* フォームフィールド */
.form-field label {
    display: block;
    font-size: 12px;
    font-weight: 300;
    color: #333;
    margin-bottom: 6px;
    text-transform: none;
    padding-left: 15px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field .field {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 21px;
    font-size: 14px;
    color: #374151;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

.form-field input:focus {
    border-color: #fb5f67;
    box-shadow: 0 0 0 3px rgba(251, 95, 103, 0.1);
}

/* 性別選択ボタン */
.gender-selection {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.gender-selection input[type="radio"] {
    display: none;
}

.gender-selection label {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    background: white;
    border-right: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    user-select: none;
    min-width: 100px;
    margin-bottom: 0;
}

.gender-selection label:last-of-type {
    border-right: none;
}

.gender-selection label:hover {
    background: #f3f4f6;
}

.gender-selection input[type="radio"]:checked + label {
    background: #fb5f67;
    color: white;
}

.gender-selection input#gender_m:checked + label {
    background: #4b9bff;
}

.gender-selection input#gender_f:checked + label {
    background: #f472b6;
}

.gender-selection input#gender_none:checked + label {
    background: #9ca3af;
}

/* ヘルプテキスト */
.help-text {
    color: #666;
    font-weight: 300;
    font-size: 14px;
}

/* 時間枠選択の改善 */
.time-slot-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.time-slot-item:hover {
    border-color: #fb5f67;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.time-slot-item.selected {
    background: #fb5f67;
    border-color: #fb5f67;
    color: white;
}

.time-slot-item.selected .time,
.time-slot-item.selected .slot-name {
    color: white;
}

.time-slot-item.selected .room-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.time-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.time {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    min-width: 60px;
}

.slot-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slot-name {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

.room-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
}

/* カレンダーの改善 */
.calendar-day.disabled {
    background: transparent !important;
    color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    border: none !important;
    box-shadow: none !important;
}

.calendar-day:empty {
    background: transparent !important;
    border: none !important;
    cursor: default !important;
}

/* レスポンシブ - 性別ボタン */
@media (max-width: 480px) {
    .gender-selection {
        display: flex;
        flex-direction: column;
        border: none;
    }
    
    .gender-selection label {
        width: 100%;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .gender-selection label:last-of-type {
        margin-bottom: 0;
    }
}