@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}

/* ===== GearSelect 比較表 共通 ===== */
.gs-table-wrapper {
    overflow-x: auto;
    margin: 16px 0;
}

.gs-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* スマホでは横スクロール */
    font-size: 14px;
}

.gs-table th,
.gs-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: middle;
}

.gs-table th {
    background: #fafafa;
    font-weight: 600;
    white-space: nowrap;
}

.gs-table td {
    background: #fff;
}

/* ヘッダー文字色を強制して見えるようにする */
.gs-table th {
    color: #333 !important;
    font-weight: 600;
}

/* ===========================
   比較表（gs-table）のスマホ最適化
   =========================== */

/* ラッパーに横スクロールを許可 */
.gs-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

/* スマホで表が縮まらず、横スクロールする */
.gs-scroll .gs-table {
  width: max-content;
  min-width: 600px; /* 700〜800でもOK、必要に応じて調整可 */
  border-collapse: collapse;
}

/* 表の基本デザイン */
.gs-table th,
.gs-table td {
  padding: 10px;
  border: 1px solid #ddd;
  white-space: nowrap; /* 折り返し防止 */
  background: #fff;
}

/* 見出しの色（黒字に変更） */
.gs-table th {
  background: #f7f7f7;
  color: #000 !important; /* 白文字になっていた問題を修正 */
  font-weight: bold;
}

/* スクロールバーを見やすく（任意） */
.gs-scroll::-webkit-scrollbar {
  height: 8px;
}
.gs-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* ===========================
   比較表（gs-table）レスポンシブ最適化
   =========================== */

/* 共通デザイン */
.gs-table th,
.gs-table td {
  padding: 10px;
  border: 1px solid #ddd;
  white-space: nowrap;
  background: #fff;
}

.gs-table th {
  background: #f7f7f7;
  color: #000 !important;
  font-weight: bold;
}

/* ---------------------------
   PC（768px〜）：横スクロール OFF
   --------------------------- */
@media screen and (min-width: 768px) {
  .gs-scroll {
    overflow-x: visible !important;
  }
  .gs-table {
    width: 100% !important;
    min-width: auto !important;
    white-space: normal !important;
  }
  .gs-table th,
  .gs-table td {
    white-space: normal !important;
  }
}

/* ---------------------------
   スマホ（〜768px）：横スクロール ON
   --------------------------- */
@media screen and (max-width: 767px) {
  .gs-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
  }

  .gs-scroll .gs-table {
    width: max-content;
    min-width: 600px; /* 必要に応じて調整OK */
  }
}

/* スクロールバー（任意） */
.gs-scroll::-webkit-scrollbar {
  height: 8px;
}
.gs-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}


/* ===========================
   スマホだけ「スクロールできます」表示
   =========================== */
@media screen and (max-width: 767px) {
  .gs-scroll {
    position: relative;
    margin-bottom: 25px; /* 余白追加（ガイド用） */
  }

  /* 表の下に小さく固定表示 */
  .gs-scroll::after {
    content: "← スクロールできます →";
    position: absolute;
    bottom: -18px; /* 表のすぐ下 */
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #777;
    opacity: 0.9;
  }
}

/* ===============================
   スマホで横スクロールだけ許可する
   =============================== */
@media screen and (max-width: 767px) {

  .gs-scroll {
    overflow-x: auto !important;   /* 横だけスクロール */
    overflow-y: hidden !important; /* 縦スクロールは無効 */
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin-bottom: 25px;
  }

  /* 表が横方向に広がるように確保 */
  .gs-scroll .gs-table {
    width: max-content;
    min-width: 600px;
  }

  /* 下のガイド表示 */
  .gs-scroll::after {
    content: "← スクロールできます →";
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #777;
    opacity: 0.9;
  }
}

/* ===============================
   PC：通常表示（スクロールなし）
   =============================== */
@media screen and (min-width: 768px) {
  .gs-scroll {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  .gs-scroll::after {
    display: none !important; /* PCではガイド非表示 */
  }
}

/* ===============================
   スマホ：横スクロールオンリー
   ＋ 下部に常時ガイド表示（CSSだけ）
   =============================== */
@media screen and (max-width: 767px) {

  .gs-scroll {
    overflow-x: auto !important;     /* 横スクロール */
    overflow-y: hidden !important;   /* 縦スクロールは禁止 */
    -webkit-overflow-scrolling: touch;
    
    padding-bottom: 22px;  /* ← ここ重要！ガイドのための余白（内部） */
    position: relative;
  }

  .gs-scroll .gs-table {
    width: max-content;
    min-width: 600px; /* 必要なら調整 */
  }

  /* 表の“内側の下”にガイドを出す（overflowの影響を受けない） */
  .gs-scroll::after {
    content: "← スクロールできます →";
    position: absolute;
    left: 0;
    bottom: 0;           /* ← padding内なので消えない */
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #777;
    opacity: 0.9;
    pointer-events: none;
  }
}
