@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/* 横スクロールのラッパー（見切れ防止の要） */
.cmp-table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* テーブル本体 */
.cmp-table{
  border-collapse: collapse;
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.4;
}

/* セル共通 */
.cmp-table th,
.cmp-table td{
  border: 1px solid #dbe7f5;
  padding: 8px 10px;
  vertical-align: middle;
  word-break: break-word;
  background: #fff;
}

/* 1行目（列見出し） */
.cmp-table th[scope="col"]{
  background: #eef6ff;
}

/* 1列目（行見出し）を横スクロール中も固定 */
.cmp-table th[scope="row"]{
  position: sticky;
  left: 0;
  z-index: 2;
  background: #eef6ff;
  font-weight: 700;
  text-align: center;

  width: 160px;
  min-width: 160px;
  max-width: 160px;

  white-space: nowrap;
}

/* 左上セル（1行目1列目＝商品）も固定 */
.cmp-table tr:first-child th:first-child{
  position: sticky;
  left: 0;
  top: 0;
  z-index: 4;
  background: #eef6ff;

  width: 140px;
  min-width: 140px;
  max-width: 140px;

  text-align: center;
  font-weight: 700;
}

/* 1行目の他の見出しが、固定列の下に潜らないように */
.cmp-table tr:first-child th{
  z-index: 1;
}

/*1023px以下*/
@media screen and (max-width: 1023px){
  .cmp-table{ font-size: 12px; min-width: 920px; }
  .cmp-table th, .cmp-table td{ padding: 7px 8px; }

  .cmp-table th[scope="row"]{
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }

  /* 左上セルも一緒に縮めたい場合 */
  .cmp-table tr:first-child th:first-child{
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }
}

/*834px以下*/
@media screen and (max-width: 834px){
  .cmp-table{ font-size: 11px; min-width: 860px; }
  .cmp-table th, .cmp-table td{ padding: 6px 7px; }

  .cmp-table th[scope="row"]{
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }

  .cmp-table tr:first-child th:first-child{
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .cmp-table th[scope="row"]{
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }

  .cmp-table tr:first-child th:first-child{
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }
}