/*
 * sep58 2026-11-08：予約フォームの日付欄のカレンダー（MW WP Form の mwform_datepicker ＝本体の jQuery UI datepicker 1.14.2）の見た目。
 * Google の置き場の smoothness（1.13.3）の代わりに、予約のページの表側だけ functions.php の style_loader_src がこれを読ませる。
 * 何を守るか：スマホでも指で日付を押せること（押す所 44px 角）。入る値・形（2026年11月05日）・選べる日は変えない（js に触らない）。
 * - 外寸は 310px（44px × 7 列 ＋ 枠線 1px × 2）。320px 未満にする理由：jQuery UI の _checkOffset は、枠が画面より小さいときだけ
 *   右のはみ出しを直す（wp-includes/js/jquery/ui/datepicker.js:919-934）
 * - 全部 .ui-datepicker の下に限る（MW WP Form の管理画面は今までどおり Google の 1.13.3 を読む）
 * - 枠の position・top・left・z-index・display は js が決める（css で固定しない）。最初の display:none だけ smoothness と同じ
 * - 入口の /css/reservation.min.css の先頭 `.ui-widget { font-size: 12px !important }` に、2 つの class で勝つ
 * 設計: notes/20261108-calendar-a-design.md（v2）
 */
.ui-datepicker {
  display: none;
  box-sizing: border-box;
  width: 310px;
  padding: 0;
  border: 1px solid #74afbd;
  border-radius: 6px;
  background: #fff;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  font-family: inherit;
}
.ui-datepicker.ui-widget,
.ui-datepicker.ui-widget select {
  font-size: 16px !important;
}
.ui-datepicker *,
.ui-datepicker *::before {
  box-sizing: border-box;
}

/* 見出し：前の月・次の月（44px 角）と、年月 */
.ui-datepicker .ui-datepicker-header {
  position: relative;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px 5px 0 0;
  background: #74afbd;
  color: #fff;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}
.ui-datepicker .ui-datepicker-prev { left: 0; }
.ui-datepicker .ui-datepicker-next { right: 0; }
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
  background: rgba(255, 255, 255, .2);
}
.ui-datepicker .ui-datepicker-prev.ui-state-disabled,
.ui-datepicker .ui-datepicker-next.ui-state-disabled {
  cursor: default;
  opacity: .35;
  background: none;
}
/* 矢印は字で出す（画像を読まない）。span の中の Prev・Next の字は見せない */
.ui-datepicker .ui-datepicker-prev .ui-icon,
.ui-datepicker .ui-datepicker-next .ui-icon {
  display: block;
  width: 44px;
  height: 44px;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  text-align: center;
}
.ui-datepicker .ui-datepicker-prev .ui-icon::before,
.ui-datepicker .ui-datepicker-next .ui-icon::before {
  display: block;
  font-size: 26px;
  line-height: 42px;
  font-weight: bold;
}
.ui-datepicker .ui-datepicker-prev .ui-icon::before { content: "\2039"; }
.ui-datepicker .ui-datepicker-next .ui-icon::before { content: "\203A"; }
.ui-datepicker .ui-datepicker-title {
  margin: 0 44px;
  line-height: 44px;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}
.ui-datepicker .ui-datepicker-title select {
  height: 32px;
  margin: 0 2px;
  padding: 0 2px;
  vertical-align: middle;
  color: #333;
}
.ui-datepicker select.ui-datepicker-year { width: 80px; }
.ui-datepicker select.ui-datepicker-month { width: 64px; }

/* 日の表：7 列 × 44px */
.ui-datepicker table.ui-datepicker-calendar {
  width: 308px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 16px;
  background: #fff;
}
.ui-datepicker .ui-datepicker-calendar th,
.ui-datepicker .ui-datepicker-calendar td {
  width: 44px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  vertical-align: middle;
}
.ui-datepicker .ui-datepicker-calendar th {
  height: 32px;
  font-size: 14px;
  font-weight: bold;
  color: #555;
}
.ui-datepicker .ui-datepicker-calendar td a,
.ui-datepicker .ui-datepicker-calendar td span {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  line-height: 44px;
  text-align: center;
  text-decoration: none;
  color: #333;
  background: none;
}
/* 土日（表の 1 列目＝日・7 列目＝土） */
.ui-datepicker .ui-datepicker-calendar th:first-child,
.ui-datepicker .ui-datepicker-calendar td:first-child a { color: #e44444; }
.ui-datepicker .ui-datepicker-calendar th:last-child,
.ui-datepicker .ui-datepicker-calendar td:last-child a { color: #2f6fb5; }
/* 今日より前（押せない）は薄く。押せないのはフォームの minDate のまま */
.ui-datepicker .ui-datepicker-calendar td.ui-state-disabled span,
.ui-datepicker .ui-datepicker-calendar td.ui-state-disabled a {
  color: #c4c4c4;
  cursor: default;
}
.ui-datepicker .ui-datepicker-calendar td a.ui-state-hover {
  background: #e3f1f4;
}
.ui-datepicker .ui-datepicker-calendar td a.ui-state-highlight {
  box-shadow: inset 0 0 0 2px #74afbd;
  font-weight: bold;
}
.ui-datepicker .ui-datepicker-calendar td a.ui-state-active {
  background: #74afbd;
  color: #fff;
  font-weight: bold;
}
.ui-datepicker .ui-datepicker-calendar td.ui-datepicker-other-month a {
  color: #aaa;
}
