/* Paraestra Schedule Manager - front styles */

.ptsm-schedule--legacy{
  width:100%;
}

.ptsm-schedule-title{
  margin: 1.2em 0 .4em;
  font-size: 1.6em;
  font-weight: 700;
}

.ptsm-print{
  margin: 0 0 0.8em;
}

.ptsm-print a{
  text-decoration: underline;
}

/* Desktop area */
.ptsm-schedule-desktop{ display:block; }
.ptsm-schedule-mobile{ display:none; }

/* Table */
.ptsm-schedule-table-wrap{
  /* schedule.html に近い横スクロール + 余白 */
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px; /* スクロールバーと下線が被らないように */
  margin: 0 0 18px;
  scrollbar-gutter: stable;
}

.ptsm-schedule-table{
  width: 100%;
  min-width: 860px; /* keep layout similar to original on desktop; mobile will hide */
  border-collapse: collapse;
  table-layout: fixed;
}

.ptsm-schedule-table th,
.ptsm-schedule-table td{
  /* 既存PDF/表の雰囲気に合わせて線を少し薄く */
  border: 1px solid #d6d6d6;
  padding: 4px 4px;
  font-size: 10.5px;
  line-height: 1.2;
  vertical-align: middle;
}

.ptsm-schedule-table thead th{
  background: #111;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.ptsm-schedule-table .ptsm-time-col{
  width: 62px;
  background: #fff;
  color: #111;
  font-weight: 700;
  text-align: center;
}

/* 最終行（営業時間終了の境界） */
.ptsm-final-row{
  letter-spacing: .08em;
  font-size: 9px;
}

/* =========================================================
   Sticky header (weekday)
   - overflow-x を使うと CSS sticky が効かない環境があるため
     JSでヘッダーを複製して固定表示する方式を採用
   ========================================================= */
:root{ --ptsm-sticky-top: 0px; }

.ptsm-sticky-head{
  position: fixed;
  top: var(--ptsm-sticky-top);
  left: 0;
  width: 0;
  display: none;
  z-index: 9999;
  pointer-events: none;
}

.ptsm-sticky-head.is-active{
  display: block;
}

.ptsm-sticky-head .ptsm-schedule-table{
  margin: 0;
  min-width: 0;
}

@media print{
  .ptsm-sticky-head{ display:none !important; }
}

.ptsm-cell{
  text-align: center;
  word-break: break-word;
}

.ptsm-cell-time{
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
}

.ptsm-cell-title{
  font-size: 12px;
  font-weight: 700;
}

.ptsm-cell-ins{
  font-size: 10px;
  margin-top: 3px;
}

.ptsm-type-free{
  background: #fff;
  font-weight: 700;
}

.ptsm-type-closed{
  background: #e2e2e2;
  text-align: center;
  font-weight: 700;
  color: #555;
}

/* Legacy day list (desktop) */
.ptsm-legacy-daylist{
  list-style: none;
  margin: 1.2em 0 0;
  padding: 0;
}

/* 1200px以上ではテーブル下の曜日別テキストを非表示（PCは表のみ） */
@media (min-width: 1200px){
  .ptsm-legacy-daylist{ display:none; }
}

.ptsm-legacy-day{
  margin: 0 0 1.2em;
}

.ptsm-legacy-day > h3{
  margin: 0 0 .6em;
  font-size: 1.1em;
  font-weight: 700;
}

.ptsm-legacy-item{
  margin: 0 0 .7em;
}

.ptsm-legacy-time{
  font-weight: 700;
}

.ptsm-legacy-ins{
  margin-top: .15em;
}

/* Free training note */
.ptsm-free-note{
  margin-top: 1.2em;
}

.ptsm-free-note h3{
  margin: 0 0 .6em;
  font-size: 1.1em;
  font-weight: 700;
}

.ptsm-free-note ul{
  margin: 0 0 .8em;
  padding-left: 1.2em;
}

/* Mobile accordion */
.ptsm-accordion{
  margin-top: 1.0em;
}

.ptsm-acc-item{
  border: 1px solid #333;
  margin: 0 0 .6em;
  background: #fff;
}

.ptsm-acc-summary{
  width: 100%;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  padding: .9em .9em;
  font-weight: 700;
  background: #111;
  color: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ptsm-acc-summary:focus{
  outline: 2px solid rgba(17,17,17,.35);
  outline-offset: 2px;
}

.ptsm-acc-icon::before{
  content: '＋';
}

.ptsm-acc-item.is-open .ptsm-acc-icon::before{
  content: '－';
}

.ptsm-acc-panel{
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}

@media (prefers-reduced-motion: reduce){
  .ptsm-acc-panel{ transition: none; }
}

.ptsm-acc-body{
  padding: .8em .9em;
}

.ptsm-acc-row{
  border: 1px solid #333;
  padding: .65em .65em;
  margin: 0 0 .7em;
}

.ptsm-acc-row:last-child{
  margin-bottom: 0;
}

.ptsm-acc-time{
  font-weight: 700;
}

.ptsm-acc-ins{
  margin-top: .15em;
}

.ptsm-acc-empty{
  color: #444;
}

/* FREE TRAINING / CLOSED の見た目（スマホ用） */
.ptsm-acc-row.ptsm-type-free{
  background: #f5f5f5;
  font-weight: 700;
}

.ptsm-acc-row.ptsm-type-closed{
  background: #e2e2e2;
  color: #555;
  font-weight: 700;
}

/* Responsive rules: match existing behavior where mobile uses accordion */
@media (max-width: 768px){
  .ptsm-schedule-desktop{ display:none; }
  .ptsm-schedule-mobile{ display:block; }

  /* Title sizes */
  .ptsm-schedule-title{ font-size: 1.4em; }
}

/* =========================================================
   PTSM Page Template header (EN/JP)
   ========================================================= */
.ptsm-page-hero{
  margin: 0 0 1.2em;
  padding: 1.1em 0 1.0em;
  border-bottom: 2px solid #111;
}

.ptsm-page-hero-en{
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.1;
}

.ptsm-page-hero-ja{
  margin-top: .35em;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 768px){
  .ptsm-page-hero-en{ font-size: 24px; }
  .ptsm-page-hero-ja{ font-size: 13px; }
}


/* =========================================================
   Timetable color presets (match existing PDF / schedule.html)
   ※色は「クラス基本設定 > タイムテーブル表示色」で割り当てできます
   ========================================================= */

/* MMA（青） */
.ptsm-schedule-table td.ptsm-style-mma,
.ptsm-acc-row.ptsm-style-mma,
.ptsm-legacy-item.ptsm-style-mma{
  background: #5B9BD5;
  color: #fff;
}

/* MMAビギナー / レスリング（薄青） */
.ptsm-schedule-table td.ptsm-style-mma_light,
.ptsm-acc-row.ptsm-style-mma_light,
.ptsm-legacy-item.ptsm-style-mma_light{
  background: #DCEAF7;
}

/* キック ベーシック / フリーミット（橙） */
.ptsm-schedule-table td.ptsm-style-kick_basic,
.ptsm-acc-row.ptsm-style-kick_basic,
.ptsm-legacy-item.ptsm-style-kick_basic{
  background: #FF9966;
}

/* キック アドバンス（赤） */
.ptsm-schedule-table td.ptsm-style-kick_adv,
.ptsm-acc-row.ptsm-style-kick_adv,
.ptsm-legacy-item.ptsm-style-kick_adv{
  background: #F26C6C;
}

/* キック ビギナー（薄橙） */
.ptsm-schedule-table td.ptsm-style-kick_beginner,
.ptsm-acc-row.ptsm-style-kick_beginner,
.ptsm-legacy-item.ptsm-style-kick_beginner{
  background: #F2E0B1;
}

/* 柔術 ベーシック（薄緑） */
.ptsm-schedule-table td.ptsm-style-bjj_basic,
.ptsm-acc-row.ptsm-style-bjj_basic,
.ptsm-legacy-item.ptsm-style-bjj_basic{
  background: #CFE3A7;
}

/* 柔術 アドバンス / フリースパー（緑） */
.ptsm-schedule-table td.ptsm-style-bjj_adv,
.ptsm-acc-row.ptsm-style-bjj_adv,
.ptsm-legacy-item.ptsm-style-bjj_adv{
  background: #59D89A;
}

/* 選手練習（赤） */
.ptsm-schedule-table td.ptsm-style-training,
.ptsm-acc-row.ptsm-style-training,
.ptsm-legacy-item.ptsm-style-training{
  background: #F26C6C;
}

/* グラップリング ベーシック/ビギナー（薄桃） */
.ptsm-schedule-table td.ptsm-style-grappling_basic,
.ptsm-acc-row.ptsm-style-grappling_basic,
.ptsm-legacy-item.ptsm-style-grappling_basic{
  background: #F7DDE3;
}

/* グラップリング アドバンス（紫） */
.ptsm-schedule-table td.ptsm-style-grappling_adv,
.ptsm-acc-row.ptsm-style-grappling_adv,
.ptsm-legacy-item.ptsm-style-grappling_adv{
  background: #B06CBF;
  color: #fff;
}

/* キッズ（黄） */
.ptsm-schedule-table td.ptsm-style-kids,
.ptsm-acc-row.ptsm-style-kids,
.ptsm-legacy-item.ptsm-style-kids{
  background: #F6FF79;
}

/* オープンマット（青緑） */
.ptsm-schedule-table td.ptsm-style-open_mat,
.ptsm-acc-row.ptsm-style-open_mat,
.ptsm-legacy-item.ptsm-style-open_mat{
  background: #0EA39B;
  color: #111;
}

/* 表の見た目をPDFに寄せる（中央寄せ） */
.ptsm-schedule-table td.ptsm-cell{
  text-align: center;
}
