/**
 * LAWS page — legal classification table
 *
 * @package mangosteen-theme
 */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap");

.mgst-laws-table-section{
  /* 参考モック準拠 — ベージュゴールド（BLACK × muted gold） */
  --laws-gold-rgb: 200, 170, 118;
  --laws-gold-highlight: rgba(var(--laws-gold-rgb), 0.52);
  --laws-gold-solid: #b8a076;
  --laws-gold-border: rgba(var(--laws-gold-rgb), 0.38);
  --laws-gold-text: #f0ebe3;

  width: 100%;
  padding: clamp(72px, 10vw, 120px) 0;
  border-top: 1px solid var(--c-line);
}

.mgst-laws-table-inner{
  max-width: 1400px;
  width: calc(100% - 80px);
  margin: 0 auto;
}

.section-head--laws-table{
  margin-bottom: clamp(40px, 6vw, 56px);
  text-align: left;
}

.mgst-laws-active-badge__hint{
  flex: 1 1 100%;
  margin: 0 0 4px;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
}

.mgst-laws-selector{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 0 24px;
}

/* 車種ボタン — 英字表記のため DIN 維持 */
.mgst-laws-selector-button,
.laws-machine-button{
  appearance: none;
  -webkit-appearance: none;
  font-family: "DIN Condensed", DINCondensed, var(--ff-display), sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--laws-gold-border);
  background: transparent;
  color: #fff;
  padding: 10px 18px;
  cursor: pointer;
  line-height: 1.2;
  transition: color .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}

.mgst-laws-selector-button:hover{
  border-color: var(--laws-gold-solid);
  color: var(--c-white);
}

.mgst-laws-selector-button.is-active{
  background: var(--laws-gold-solid);
  border-color: var(--laws-gold-solid);
  color: #1a1a1a;
  box-shadow: none;
}

.mgst-laws-active-badge{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(16px, 2.5vw, 24px);
  margin-bottom: clamp(24px, 4vw, 40px);
  padding: 0;
  border: none;
  background: transparent;
}

.mgst-laws-active-badge__text{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: flex-end;
  gap: 0.1em 0.45em;
  padding: 0;
}

.mgst-laws-active-badge__machine{
  font-family: "DIN Condensed", DINCondensed, var(--ff-display), sans-serif;
  font-weight: 700;
  font-size: clamp(72px, 7vw, 140px);
  color: var(--c-white);
  line-height: 0.92;
  letter-spacing: 0.03em;
}

.mgst-laws-active-badge__category{
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: clamp(13px, 1.35vw, 15px);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.laws-machine-button,
.laws-machine-button *,
.mgst-laws-selector-button,
.mgst-laws-selector-button *{
  font-family: "DIN Condensed", DINCondensed, var(--ff-display), sans-serif !important;
}

.mgst-laws-table-scroll{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: none;
  background: rgba(0,0,0,.35);
}

/* 法律分類表 — 日本語本文は Noto Sans JP */
.laws-table,
.laws-table *,
.mgst-laws-table,
.mgst-laws-table *{
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
}

.mgst-laws-table{
  --laws-label-col1-width: 112px;

  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
  word-break: keep-all;
  white-space: nowrap;
}

.mgst-laws-table caption{
  caption-side: bottom;
  text-align: left;
  padding: 10px 0 0;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.62);
  white-space: normal;
}

.mgst-laws-faq-mark{
  color: #edc25b;
}

.laws-table td,
.laws-table th,
.mgst-laws-table td,
.mgst-laws-table th{
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.8;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  word-break: keep-all;
  transition: background 0.2s ease, color 0.2s ease;
}

.laws-table td,
.mgst-laws-table td{
  font-weight: 400;
}

.laws-table .sticky-col,
.laws-table .is-label,
.laws-table .is-sub-label,
.mgst-laws-table .sticky-col,
.mgst-laws-table .is-label,
.mgst-laws-table .is-sub-label{
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  color: #111;
  background: #d9d9d9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

.mgst-laws-table th.sticky-col:nth-child(2){
  left: var(--laws-label-col1-width);
  z-index: 4;
}

.mgst-laws-table__group,
.mgst-laws-table__row-label,
.mgst-laws-table__sub,
.mgst-laws-table__corner{
  font-weight: 500;
}

.mgst-laws-table tr > th.mgst-laws-table__label-col:first-child{
  width: var(--laws-label-col1-width);
  min-width: var(--laws-label-col1-width);
  max-width: var(--laws-label-col1-width);
}

.mgst-laws-table tr > th.mgst-laws-table__label-col:nth-child(2){
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

.mgst-laws-table__head th,
.mgst-laws-table__head-col{
  background: #d9d9d9;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* FAQ 相当のゴールド行 */
.laws-table tr.is-important td,
.laws-table tr.is-important th,
.mgst-laws-table__row--faq td,
.mgst-laws-table__row--faq th,
.mgst-laws-table__row--faq .mgst-laws-table__cell{
  background: #edc25b !important;
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mgst-laws-table__faq-th{
  background: #dbb048 !important;
  color: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 法律分類列ハイライト — 参考モック：半透明ベージュゴールド（LIGHT） */
.laws-table .is-active-category,
.mgst-laws-table .is-active-category{
  background: var(--laws-gold-highlight) !important;
  color: var(--laws-gold-text) !important;
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

.laws-table .is-active-category:hover,
.mgst-laws-table .is-active-category:hover{
  background: var(--laws-gold-highlight) !important;
  color: var(--laws-gold-text) !important;
}

/* ---------- Variant switch (FT-02 580/1000) ---------- */
.mgst-laws-variant-switch[hidden]{
  display: none !important;
}

.mgst-laws-variant-switch{
  width: 100%;
}

.mgst-laws-variant-switch__track{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  min-height: 56px;
  height: 56px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--laws-gold-border);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  touch-action: none;
  cursor: pointer;
}

.mgst-laws-variant-switch__thumb{
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: rgba(var(--laws-gold-rgb), 0.62);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: transform;
}

.mgst-laws-variant-switch.is-variant-1000 .mgst-laws-variant-switch__thumb{
  transform: translateX(100%);
}

.mgst-laws-variant-switch__option{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgst-laws-variant-switch__option.is-active{
  color: var(--laws-gold-text);
  font-weight: 500;
}

.mgst-laws-variant-switch__option-text{
  pointer-events: none;
}

.mgst-laws-note{
  margin: 32px 0 0;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 13px;
  line-height: 2;
  color: var(--c-text-mute);
}

.mgst-laws-updated{
  margin: 16px 0 0;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.42);
}

/* セクション見出し — 英字 eyebrow のみ DIN、本文タイトルは日本語フォント */
.mgst-laws-table-section .section-head__title{
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mgst-laws-table-section .section-head__title small{
  font-family: var(--ff-en);
  font-weight: 500;
  letter-spacing: 0.18em;
}

@media (max-width: 768px){
  .mgst-laws-table-inner{
    width: calc(100% - 32px);
  }

  .mgst-laws-selector{
    gap: 8px;
    margin-top: 28px;
  }

  .mgst-laws-selector-button{
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 11px 12px;
    font-size: 10px;
    text-align: center;
  }

  .mgst-laws-table{
    min-width: 880px;
  }

  .laws-table td,
  .laws-table th,
  .mgst-laws-table td,
  .mgst-laws-table th{
    padding: 10px 12px;
    font-size: 12px;
  }

  .mgst-laws-table__sticky-col{
    max-width: 140px;
    white-space: normal;
  }

  .mgst-laws-active-badge{
    gap: 14px;
    margin-bottom: 20px;
  }

  .mgst-laws-active-badge__machine{
    font-size: clamp(44px, 14vw, 88px);
    letter-spacing: 0.025em;
  }

  .mgst-laws-active-badge__category{
    font-size: 12px;
  }

  .mgst-laws-variant-switch__option{
    font-size: 11px;
    padding: 0 10px;
  }
}

/* ---------- LAWS — managed FAQ (ACF) ---------- */
.mgst-laws-faq{
  padding-top: clamp(72px, 10vw, 120px);
  padding-bottom: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--c-line);
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
}

.section-head--laws-faq{
  margin-bottom: clamp(32px, 5vw, 48px);
}

.mgst-laws-faq .section-head__title{
  font-family: "DIN Condensed", DINCondensed, var(--ff-display), sans-serif;
  letter-spacing: 0.06em;
}

.mgst-laws-faq-list{
  display: grid;
  gap: 0;
}

.mgst-laws-faq-item{
  border: 1px solid var(--c-line);
  border-bottom: none;
  background: var(--c-bg-soft);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.mgst-laws-faq-item:last-child{
  border-bottom: 1px solid var(--c-line);
}

.mgst-laws-faq-item:hover{
  border-color: var(--c-line-2);
  box-shadow: 0 0 20px rgba(200, 164, 93, 0.08);
}

.mgst-laws-faq-item.is-open{
  border-color: rgba(200, 164, 93, 0.45);
  box-shadow: 0 0 28px rgba(200, 164, 93, 0.12);
}

.mgst-laws-faq-question{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 22px 24px;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--c-gold);
  transition: color .35s var(--ease), border-color .35s var(--ease);
}

.mgst-laws-faq-item.is-open .mgst-laws-faq-question{
  border-bottom-color: var(--c-line-2);
}

.mgst-laws-faq-question__label{
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  flex: 0 0 auto;
  line-height: 1.6;
}

.mgst-laws-faq-question__text{
  flex: 1;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-white);
  letter-spacing: 0.02em;
}

.mgst-laws-faq-question__icon{
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-line-2);
  border-radius: 50%;
  color: var(--c-gold);
  transition: transform .4s var(--ease), background .3s var(--ease), color .3s var(--ease);
}

.mgst-laws-faq-item.is-open .mgst-laws-faq-question__icon{
  transform: rotate(45deg);
  background: var(--c-gold);
  color: #000;
  border-color: var(--c-gold);
}

.mgst-laws-faq-answer{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}

.mgst-laws-faq-item.is-open .mgst-laws-faq-answer{
  grid-template-rows: 1fr;
}

.mgst-laws-faq-answer__inner{
  overflow: hidden;
  display: flex;
  gap: 16px;
  padding: 0 24px;
  color: rgba(255,255,255,.88);
}

.mgst-laws-faq-item.is-open .mgst-laws-faq-answer__inner{
  padding: 0 24px 24px;
}

.mgst-laws-faq-answer__label{
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  flex: 0 0 auto;
  line-height: 2;
  color: rgba(255,255,255,.45);
}

.mgst-laws-faq-answer__content{
  flex: 1;
  font-family: "Noto Sans JP", var(--ff-jp), sans-serif;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
}

.mgst-laws-faq-answer__content p{
  margin: 0 0 1em;
}

.mgst-laws-faq-answer__content p:last-child{
  margin-bottom: 0;
}

@media (max-width: 768px){
  .mgst-laws-faq-question{
    padding: 18px 16px;
    gap: 12px;
  }

  .mgst-laws-faq-question__text{
    font-size: 15px;
  }

  .mgst-laws-faq-item.is-open .mgst-laws-faq-answer__inner{
    padding: 0 16px 20px;
  }

  .mgst-laws-faq-answer__inner{
    padding: 0 16px;
  }
}
