/* ================================
   Service Tab Link With Card
================================ */

/* 全体 */
.serviceTabLinkWithCard {
  width: 100%;
}

/* ================================
   Tabs（PC）
================================ */

.serviceTabLinkWithCard__tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--X2S);
  margin-bottom: var(--X3L);
}

.serviceTabLinkWithCard__tab {
  list-style: none;
}

/* タブボタン */
.serviceTabLinkWithCard__tabBtn {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--XS);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-separate-secondary);
  border-radius: var(--radius-m);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* アイコン */
.serviceTabLinkWithCard__tabIcon img {
  display: block;
  margin-bottom: var(--X2S);
}

/* ラベル */
.serviceTabLinkWithCard__tabLabel {
  font-size: var(--font-s);
  font-weight: 700;
  color: var(--color-text-secondary);
}

/* hover */
.serviceTabLinkWithCard__tabBtn:not(.is-active):hover {
  background: #F0F6F8;
}

/* active（PC） */
.serviceTabLinkWithCard__tabBtn.is-active {
  background: #fff;
  border-color: #fff;
}

.serviceTabLinkWithCard__tabBtn.is-active
.serviceTabLinkWithCard__tabLabel {
  color: var(--color-text-primary);
}

/* 赤い下線（PC） */
@media screen and (min-width: 767px) {
  .serviceTabLinkWithCard__tabBtn.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--color-primary);
  }
}

/* ================================
   Panels（PC）
================================ */

.serviceTabLinkWithCard__panels {
  width: 100%;
}

.serviceTabLinkWithCard__panel {
  display: none;
}

.serviceTabLinkWithCard__panel.is-active {
  display: block;
}

@media screen and (max-width: 468px) {
  .serviceTabLinkWithCard__panelTitle {
    display: none;
  }
}

/* ================================
   Cards（仮）
================================ */

.serviceTabLinkWithCard__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--S);
}

.serviceTabLinkWithCard__card {
  list-style: none;
}

.serviceTabLinkWithCard__card a {
  display: block;
  padding: var(--M);
  background: #fff;
  border: 1px solid var(--color-separate-primary);
  border-radius: var(--radius-l);
  text-decoration: none;
  color: var(--color-text-primary);
}

/* ================================
   SP（〜468px）：アコーディオン
================================ */

@media screen and (max-width: 767px) {

  /* タブを縦並び */
  .serviceTabLinkWithCard__tabs {
    display: block;
    grid-template-columns: none;
    gap: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 0;
  }

  /* タブ見出しを横並び */
  .serviceTabLinkWithCard__tabBtn {
    flex-direction: row;
    justify-content: flex-start;
    padding: var(--S);
    background: var(--color-bg-secondary);
    border: none;
    border-bottom: 1px solid var(--color-separate-primary);
    border-radius: 0;
  }

  .serviceTabLinkWithCard__tab:first-child
  .serviceTabLinkWithCard__tabBtn {
    border-top: 1px solid var(--color-separate-primary);
  }

  .serviceTabLinkWithCard__tabIcon {
    margin-right: var(--XS);
  }

  .serviceTabLinkWithCard__tabIcon img {
    margin-bottom: 0;
    width: 24px;
  }

  .serviceTabLinkWithCard__tabLabel {
    font-size: var(--font-m);
    color: var(--color-text-secondary);
  }

  /* 矢印 */
  .serviceTabLinkWithCard__tabBtn::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    margin-left: auto;
    background: url("/bizpost/assets/img/components/service-tab-link-with-card/arrow_under.svg")
      no-repeat center / contain;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
  }

  .serviceTabLinkWithCard__tabBtn.is-active::after {
    transform: rotate(180deg);
  }

  /* パネル */
  .serviceTabLinkWithCard__panel {
    display: none;
    padding: 0 var(--S);
    background: #F6FAFB;
    border-radius: var(--radius-l);
  }

  .serviceTabLinkWithCard__panel.is-active {
    display: block;
    background: none;
  }

  /* カードは1カラム */
  .serviceTabLinkWithCard__cards {
    grid-template-columns: 1fr;
    padding: var(--X2S);
    background: #F6FAFB;
    border-radius: var(--radius-m);
  }
}
