/* エラーメッセージ */
.error_message {
  color: #d63638;
  background-color: #fcf0f1;
  border: 1px solid #d63638;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
}

.error_message-hide {
  display: none;
}

/* 成功メッセージ */
.error_message.success_message {
  color: #00a32a;
  background-color: #f0f6fc;
  border: 2px solid #00a32a;
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 163, 42, 0.2);
}

.success_message-hide {
  display: none;
}

.error_message-hide {
  display: none;
}

/* 容量ヒント */
.reserve_capacity_hint {
  color: #50575e;
  font-size: 13px;
  margin-top: 8px;
}

/* 土曜日の選択肢を青色で表示 */
#reserve_date option.lzsr-saturday {
  color: #0066cc;
  font-weight: normal;
}

/* カレンダーの休日表示 */
.reserve_calendar .re_holiday {
  color: #d63638;
  font-weight: bold;
}

/* カレンダーのTEL表示 */
.reserve_calendar .re_tel {
  color: #2271b1;
  font-weight: bold;
}

.reserve_calendar .re_tel a {
  color: #000000;
  text-decoration: underline;
}

.reserve_calendar .re_tel a:hover {
  text-decoration: underline;
}

/* カレンダーの月変更リンク */
.reserve_calendar_box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reserve_calendar_year {
  box-sizing: border-box;
}

.reserve_calendar_months {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.reserve_calendar_months > .reserve_calendar_year {
  flex: 0 0 auto;
  width: auto;
  min-width: 280px;
  max-width: calc(50% - 15px);
  box-sizing: border-box;
}

.reserve_calendar_wrap {
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.reserve_calendar {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  box-sizing: border-box;
}

.reserve_date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
}

.calendar-nav {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  text-decoration: none;
  color: #2271b1;
  font-size: 24px;
  font-weight: bold;
  border: 1px solid #2271b1;
  border-radius: 3px;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.calendar-nav:hover {
  background-color: #2271b1;
  color: #fff;
}

.calendar-nav.calendar-disabled {
  color: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

/* カレンダーのローディング表示 */
.calendar-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.calendar-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.calendar-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2271b1;
  border-radius: 50%;
  animation: calendar-spin 1s linear infinite;
}

.calendar-loading-text {
  font-size: 14px;
  color: #2271b1;
  font-weight: bold;
}

@keyframes calendar-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* モーダル全体：閉じている時は完全に無効化 */
.lzsr-reserve-modal {
  position: fixed;
  inset: 0;
  display: flex;            /* ← displayは常にflex */
  visibility: hidden;       /* ← 見えなくする */
  pointer-events: none;     /* ← タッチを完全遮断 */
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

/* 開いている時だけ有効 */
.lzsr-reserve-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.lzsr-reserve-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* モーダルが閉じている時は overlay も無効 */
.lzsr-reserve-modal:not(.is-open) .lzsr-reserve-modal__overlay {
  pointer-events: none;
}

.lzsr-reserve-modal__panel {
  position: relative;
  width: min(680px, 92vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 16px 20px;
  z-index: 1;
}

.lzsr-reserve-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.lzsr-reserve-modal__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.lzsr-reserve-modal__close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lzsr-reserve-modal__close:hover {
  color: #000;
}

.lzsr-reserve-modal__body {
  margin-top: 16px;
}

/* モーダル内のテーブルスタイル */
.lzsr-reserve-modal__body .formTable {
  font-size: 13px;
  width: 100%;
  border-collapse: collapse;
}

.lzsr-reserve-modal__body .formTable th {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  width: 35%;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.lzsr-reserve-modal__body .formTable td {
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  word-break: break-word;
}

/* モーダル内のボタン */
.lzsr-reserve-modal__body .form_btn {
  margin-top: 16px;
}

.lzsr-reserve-modal__body .form_btn input[type="button"] {
  font-size: 14px;
  padding: 8px 20px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 送信中モーダルのローディングスピナー */
@keyframes lzsr-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.lzsr-loading-spinner {
  animation: lzsr-spin 1s linear infinite;
}

/* フォームボタンのタッチ対応 */
.form_btn input[type="button"],
.form_btn input[type="reset"],
.form_btn input[type="submit"] {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* カレンダーの日付リンクのタッチ対応 */
.reserve_calendar a[data-date] {
  display: block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* カレンダーの休日表示の位置調整（上に配置） */
.reserve_calendar .re_holiday {
  display: block;
  margin-top: 0;
  line-height: 1;
}

/* セレクトボックスと入力フィールドの基本スタイル */
select,
input[type="text"],
input[type="email"],
textarea {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

/* フォーム全体の基本スタイル */
#reserve_form {
  position: relative;
}

/* フォーム要素の基本スタイル */
#reserve_form input,
#reserve_form select,
#reserve_form textarea {
  -webkit-user-select: text;
  user-select: text;
  /* タップ反応を改善するための最小サイズ */
  min-height: 44px;
  font-size: 16px; /* iOSでズームを防ぐ */
  cursor: text;
}

/* メールアドレス入力フィールドの基本スタイル */
#reserve_form input[name="email"] {
  -webkit-user-select: text;
  user-select: text;
  min-height: 44px;
  font-size: 16px;
  padding: 8px 12px;
  box-sizing: border-box;
  cursor: text;
}

/* 備考（textarea）の基本スタイル */
#reserve_form textarea[name="remarks"] {
  -webkit-user-select: text;
  user-select: text;
  font-size: 16px;
  padding: 8px 12px;
  box-sizing: border-box;
  /* インラインスタイルの高さ指定を尊重しつつ、最小高さを確保 */
  min-height: 200px;
  /* パディングとボーダー */
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  cursor: text;
}

/* 幅の狭い画面での時間選択の上に隙間を追加 */
@media (max-width: 768px) {
  #reserve_time {
    margin-top: 12px;
    display: block;
  }
  
  /* 日付と時間が縦に並ぶようにする */
  #reserve_date + select#reserve_time {
    margin-top: 12px;
  }
}

