/* ===========================
   カラー変数
=========================== */
:root {
  --tab-color: #EA9988;
  --tab-color-text: #ffffff;
  --tab-border: #EA9988;
}

/* ===========================
   タブセクション全体
=========================== */
.tab-section-tab {
  width: 100%;
}

/* ===========================
   【PC】1025px 以上
=========================== */
.tab-buttons-wrapper-tab {
  position: relative;
  top: 0;
  z-index: 30;
  background: transparent;
  padding: 0px 20px 0 20px;
}

.tab-buttons-tab {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.tab-buttons-visible-tab {
  display: contents;
}

/* ===========================
   ボタン共通スタイル
=========================== */
.btn-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  border-radius: 15px;
  border: 2px solid var(--tab-border);
  color: var(--tab-color);
  background-color: #fff;
  font-size: 1.25em;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 8px;
}

.btn-tab:hover {
  background-color: var(--tab-color);
  color: var(--tab-color-text);
}

.btn-tab.active {
  background-color: var(--tab-color);
  color: var(--tab-color-text);
}

/* ===========================
   コンテンツエリア
=========================== */
.tab-contents-tab {
  width: 100%;
}

.tab-panel-tab {
  display: none;
  animation: fadeIn-tab 0.3s ease;
}

.tab-panel-tab.active {
  display: block;
}

@keyframes fadeIn-tab {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-panel-inner-tab {
  width: 100%;
}



/* ===========================
   【タブレット・スマホ】
   1024px 以下
=========================== */
@media (max-width: 768px) {

  /* ===== ラッパー：下部固定 ===== */
  .tab-buttons-wrapper-tab {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 12px;
    border-bottom: none;
    border-top: 2px solid #e0e0e0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
    z-index:30;
  }

  .tab-buttons-tab {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .tab-buttons-visible-tab {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .btn-tab {
    height: 52px;
    font-size: 1.15em;
    border-radius: 10px;
    padding: 0 6px;
    box-sizing: border-box;
  }

  /* ↓ フッターの直前にのみスペーサーを適用 */
  .tab-bottom-spacer-tab {
    display: block;
    height: 120px;
    /* フッター直前の場合は非表示にする */
  }


}

/* ===========================
   スマホ 480px 以下
=========================== */
@media (max-width: 480px) {

  .tab-buttons-wrapper-tab {
    padding: 8px 10px;
  }

  .btn-tab {
    height: 46px;
    font-size: 1.05em;
    border-radius: 8px;
    box-sizing: border-box;
  }

  .tab-bottom-spacer-tab {
    height: 110px;
  }
}