/* ========================================
   ブロックの基本要素スタイル
   管理画面のエディタとフロントの両方に読み込む（enqueue_block_assets）
   ブロックスタイル（is-style-*）はラッパーの 1 クラスで切り替えるため、
   FLOCSS の構造／装飾の分離はせず、同一セレクタに構造と装飾を書く
   セレクタの方針（ADR 0009。雛形 theme-boilerplate の docs/rules/block-css.md）:
   - ラッパーに付くユニーククラス（is-style-*）を起点にし、詳細度は 1 クラス + 要素（0,1,1）まで。
     プラグインの状態クラス（.is-th 等）と重ねる 2 クラス（0,2,0）は例外として許可する
   - .wp-block-* やプラグイン内部クラス（.delta-table）との連結、:not() による上乗せ、!important はしない
   - プラグイン既定 CSS と同じ詳細度になるため、読み込み順で上書きする
     （blockeditor_styles() でテーマ CSS をプラグイン CSS のハンドルに依存させる）
   - 要素ごとの違いは「共通 → 個別で上書き」の記述順で表す
======================================== */

/* ----------------------------------------
   delta-table-block: コース情報表（is-style-course-table）
   お申し込み受付中コース一覧の本文（ADR 0008）。
   旧 style.css の .course-list-layout .l-table を移植。
   フロント: 保存形の th / td / tr（セル・行にはクラスが付かないため要素で指定）
   エディタ: .delta-table-editor__row / .delta-table-editor__cell（th は .is-th）
   プラグイン既定（全周の border・th の primary 塗り・padding .9rem）を
   読み込み順で上書きする。table-layout: fixed（列幅指定）はプラグインのまま。
---------------------------------------- */
.is-style-course-table {
  width: 100%;
  margin-top: 12px;
}

.is-style-course-table th,
.is-style-course-table td,
.is-style-course-table .delta-table-editor__cell {
  vertical-align: middle;
  padding: 12px;
  border: 0;
  background-color: transparent;
  border-bottom: 1px solid #D8D8D8;
}

.is-style-course-table th,
.is-style-course-table .is-th {
  border-bottom-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--navy);
  font-size: 1.125rem;
  font-weight: 500;
  text-align: left;
}

.is-style-course-table p {
  margin: 0;
}

@media (max-width: 782px) {
  .is-style-course-table tr,
  .is-style-course-table .delta-table-editor__row {
    display: block;
    margin: 0;
    border-bottom: 1px solid #D8D8D8;
    padding: 10px 0;
    position: relative;
  }

  .is-style-course-table tr::after,
  .is-style-course-table .delta-table-editor__row::after {
    content: "";
    width: 30%;
    height: 1px;
    background-color: var(--wp--preset--color--primary);
    position: absolute;
    bottom: -1px;
    left: 0;
  }

  /* 1 列目セルの style="width:24%"（列幅指定）は縦積みでは不要なため、min-width で全幅に広げる。
     margin: 0 はエディタで core-adjustments.css のブロック間余白（[class*="wp-block-"] + …）が乗るのを打ち消す */
  .is-style-course-table th,
  .is-style-course-table td,
  .is-style-course-table .delta-table-editor__cell {
    display: block;
    margin: 0;
    min-width: 100%;
    border-bottom: none;
    padding: 0;
  }

  .is-style-course-table th,
  .is-style-course-table .is-th {
    font-size: 1rem;
    margin-bottom: 4px;
  }
}
