/* コンテナ全体の装飾・余白調整 */
.cmp-plan-spec-wrapper {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* PC向けテーブルスタイル */
.cmp-plan-spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
}

.cmp-plan-spec-table th,
.cmp-plan-spec-table td {
  padding: 16px 12px;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
  line-height: 1.5;
  box-sizing: border-box;
}

/* PC時の列幅設定 */
.cmp-plan-spec-table th:first-child,
.cmp-plan-spec-table td:first-child {
  width: 22%;
  font-weight: bold;
}

.cmp-plan-spec-table th:not(:first-child),
.cmp-plan-spec-table td:not(:first-child) {
  width: 26%;
}

.cmp-plan-spec-table .cmp-plan-spec-th-empty {
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
}

.cmp-plan-spec-note {
  display: inline-block;
  text-align: left;
  margin-top: 4px;
  font-weight: normal;
}

/* --------------------------------------------------
   SP向けレスポンシブ対応（横スクロールなし・縦並び変換）
-------------------------------------------------- */
@media screen and (max-width: 768px) {
  /* テーブル要素のブロック化 */
  .cmp-plan-spec-table,
  .cmp-plan-spec-table thead,
  .cmp-plan-spec-table tbody,
  .cmp-plan-spec-table th,
  .cmp-plan-spec-table td,
  .cmp-plan-spec-table tr {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* ヘッダー行を非表示 */
  .cmp-plan-spec-table thead {
    display: none;
  }

  /* 行をカード単位として扱う */
  .cmp-plan-spec-table tr {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
  }
  
  .cmp-plan-spec-table tr:last-child {
    margin-bottom: 0;
  }

  /* 行の見出し（提供開始日、視聴範囲、料金など） */
  .cmp-plan-spec-table th[scope="row"] {
    background-color: #f5f5f5;
    text-align: center;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    padding: 12px;
  }

  /* 各項目のデータセル */
  .cmp-plan-spec-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .cmp-plan-spec-table td:last-child {
    border-bottom: none;
  }

  /* HTMLのdata-label属性から会員種別ラベルを自動生成 */
  .cmp-plan-spec-table td::before {
    content: attr(data-label);
    font-weight: bold;
    text-align: left;
    padding-right: 12px;
    flex-shrink: 0;
    max-width: 50%;
  }
}