/**
 * 予約カレンダー（calender_body.php の table.reserve-calendar）
 * analysis/TOPカレンダーHTML_CSS設計.md に準拠
 */
:root {
  --takano-green: #174f43;
  --takano-green-2: #246d5b;
  --takano-green-soft: #eaf4ef;
  --takano-cream: #fbf6ec;
  --takano-paper: #fffdf8;
  --takano-gold: #b98535;
  --takano-red-soft: #fff0f0;
  --takano-gray: #f0eee9;
  --takano-text: #19241f;
  --takano-muted: #5c6f66;
}

.calendar-welcome {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  text-align: center;
}

.reserve-calendar {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 5px;
  margin: 0 auto;
  background: transparent;
}

.reserve-calendar td,
.reserve-calendar th {
  border: none;
  vertical-align: middle;
  word-break: break-all;
}

.reserve-calendar td {
  width: 14.285%;
  min-width: 0;
  padding: 7px 3px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  border: 1px solid rgba(25, 36, 31, 0.06);
}

/* 月移動行 */
.reserve-calendar tr:first-child td {
  padding: 12px 8px;
  font-size: clamp(11px, 2.8vw, 14px);
  font-weight: 900;
  background: #fffdf8;
  border: 1px solid rgba(23, 79, 67, 0.14);
  color: var(--takano-text);
}

.reserve-calendar tr:first-child a {
  color: var(--takano-green);
  text-decoration: none;
  font-weight: 900;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  background: var(--takano-green-soft);
}

.reserve-calendar tr:first-child a:hover,
.reserve-calendar tr:first-child a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .reserve-calendar {
    border-spacing: 3px;
  }

  .reserve-calendar tr:first-child td {
    padding: 8px 3px;
    white-space: nowrap;
    word-break: keep-all;
  }

  .reserve-calendar tr:first-child a {
    display: inline-block;
    padding: 0.22rem 0.32rem;
    font-size: 10px;
    line-height: 1.2;
  }
}

/* 曜日見出し（インラインstyleを上書き） */
.reserve-calendar tr:nth-child(2) td {
  padding: 7px 2px;
  font-weight: 900;
  font-size: 11px;
  background: transparent !important;
  color: var(--takano-muted) !important;
  border-color: transparent;
}

.reserve-calendar tr:nth-child(2) td:first-child {
  color: #c2410c !important;
}

.reserve-calendar tr:nth-child(2) td:last-child {
  color: var(--takano-green) !important;
}

.uketuke,
.uketuke_nichiyou,
.uketuke_doyou {
  background: linear-gradient(180deg, #f4fbf7 0%, var(--takano-green-soft) 100%) !important;
  color: var(--takano-text) !important;
  border-color: rgba(23, 79, 67, 0.12);
}

.yasumi {
  background: var(--takano-gray) !important;
  color: #a54833 !important;
}

.yasumi_rinji {
  background: var(--takano-red-soft) !important;
  color: #9d174d !important;
}

.owari {
  background: #ebe8df !important;
  color: #817b71 !important;
}

.jyunbi {
  background: #f5f0e4 !important;
  color: #8a6a35 !important;
}

.reserve-calendar input[type="submit"] {
  width: 100%;
  min-height: 34px;
  margin-top: 5px;
  padding: 5px 2px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--takano-green), #246d5b);
  color: #fff;
  box-shadow: 0 8px 16px rgba(23, 79, 67, 0.18);
  -webkit-appearance: none;
  appearance: none;
}

.reserve-calendar input[type="submit"]:hover,
.reserve-calendar input[type="submit"]:focus-visible {
  background: #185445;
}

.saikidou {
  margin: 1rem 0 0;
  text-align: center;
}

.saikidou input[type="submit"] {
  max-width: 100%;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 79, 67, 0.18);
  background: #fff;
  color: var(--takano-green);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 768px) {
  .reserve-calendar {
    border-spacing: 9px;
  }

  .reserve-calendar td {
    padding: 12px 7px;
    font-size: 15px;
  }

  .reserve-calendar tr:nth-child(2) td {
    font-size: 13px;
  }

  .reserve-calendar input[type="submit"] {
    font-size: 13px;
    min-height: 36px;
  }
}

/* 従来のネット予約単体ページ */
body.legacy-cal-shell {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--takano-cream);
  color: var(--takano-text);
}

body.legacy-cal-shell .legacy-cal-header {
  text-align: center;
  padding: 1rem;
  background: var(--takano-green);
  color: #fff;
}

body.legacy-cal-shell .legacy-cal-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

body.legacy-cal-shell .legacy-cal-promo {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fecaca;
}

body.legacy-cal-shell main {
  padding: 1rem;
  max-width: 980px;
  margin: 0 auto;
}

body.legacy-cal-shell .legacy-cal-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: #5c6f66;
}
