/* 公約比較 - 聴くマニフェスト CSS */

/* 大項目タブ（政党を選ぶ / 公約を選ぶ） */
.manifesto-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin: 30px 0 30px;
}

.manifesto-mode-tab {
  font-size: 2.0rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: #333;
  border: none;
  background-color: #ededed;
}

.manifesto-mode-tab:hover {
  color: #666;
  background: #e0e0e0;
}

.manifesto-mode-tab[aria-selected="true"] {
  color: #fff;
  background: #666;
}

/* ステップ表示 */
.manifesto-step {
  margin-bottom: 30px;
}

.manifesto-step:last-child {
  margin-bottom: 30px;
}

/* 絞り込みタブ */
.manifesto-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
}

/* タブボタン */
.manifesto-tab-btn {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: #333;
  border: none;
  background-color: #ededed;
}

.manifesto-tab-btn:hover {
  color: #666;
  background: #e0e0e0;
}

.manifesto-tab-btn.is-active {
  color: #fff;
  background: #666;
}

.manifesto-tab-btn:disabled {
  cursor: default;
  opacity: 0.4;
}

.manifesto-tab-btn:disabled:hover {
  color: #333;
  background-color: #ededed;
}

/* 政党別カラー - 自民党 */
.manifesto-tab-btn--ldp {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #D05A49;
}
.manifesto-tab-btn--ldp:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--ldp.is-active {
  background-color: #D05A49;
  color: #fff;
  border-left: 10px solid #D05A49;
}

/* 政党別カラー - 中道改革連合 */
.manifesto-tab-btn--chudo {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #4274B6;
}
.manifesto-tab-btn--chudo:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--chudo.is-active {
  background-color: #4274B6;
  color: #fff;
  border-left: 10px solid #4274B6;
}

/* 政党別カラー - 日本維新の会 */
.manifesto-tab-btn--ishin {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #A2CA4F;
}
.manifesto-tab-btn--ishin:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--ishin.is-active {
  background-color: #A2CA4F;
  color: #333;
  border-left: 10px solid #A2CA4F;
}

/* 政党別カラー - 国民民主党 */
.manifesto-tab-btn--dpfp {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #ECBC39;
}
.manifesto-tab-btn--dpfp:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--dpfp.is-active {
  background-color: #ECBC39;
  color: #333;
  border-left: 10px solid #ECBC39;
}

/* 政党別カラー - 共産党 */
.manifesto-tab-btn--jcp {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #A1609D;
}
.manifesto-tab-btn--jcp:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--jcp.is-active {
  background-color: #A1609D;
  color: #fff;
  border-left: 10px solid #A1609D;
}

/* 政党別カラー - れいわ新選組 */
.manifesto-tab-btn--reiwa {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #DD8DB1;
}
.manifesto-tab-btn--reiwa:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--reiwa.is-active {
  background-color: #DD8DB1;
  color: #333;
  border-left: 10px solid #DD8DB1;
}

/* 政党別カラー - 減税日本・ゆうこく連合 */
.manifesto-tab-btn--genzei {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #F2EACB;
}
.manifesto-tab-btn--genzei:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--genzei.is-active {
  background-color: #F2EACB;
  color: #333;
  border-left: 10px solid #F2EACB;
}

/* 政党別カラー - 参政党 */
.manifesto-tab-btn--sansei {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #DF9340;
}
.manifesto-tab-btn--sansei:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--sansei.is-active {
  background-color: #DF9340;
  color: #fff;
  border-left: 10px solid #DF9340;
}

/* 政党別カラー - 日本保守党 */
.manifesto-tab-btn--hoshuto {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #929E2B;
}
.manifesto-tab-btn--hoshuto:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--hoshuto.is-active {
  background-color: #929E2B;
  color: #fff;
  border-left: 10px solid #929E2B;
}

/* 政党別カラー - 社民党 */
.manifesto-tab-btn--sdp {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #6ABCEF;
}
.manifesto-tab-btn--sdp:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--sdp.is-active {
  background-color: #6ABCEF;
  color: #333;
  border-left: 10px solid #6ABCEF;
}

/* 政党別カラー - チームみらい */
.manifesto-tab-btn--mirai {
  background-color: #ededed;
  color: #333;
  border-left: 10px solid #AED3C2;
}
.manifesto-tab-btn--mirai:hover {
  background-color: #e0e0e0;
  color: #333;
}
.manifesto-tab-btn--mirai.is-active {
  background-color: #AED3C2;
  color: #333;
  border-left: 10px solid #AED3C2;
}

/* Step2の案内メッセージ */
.manifesto-step2-guide {
  font-size: 1.4rem;
  color: #999;
  padding: 14px;
  text-align: center;
  background-color: #f9f9f9;
  border: 1px dashed #ccc;
}

/* 音声モーダル */
.audio-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.audio-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.audio-modal.is-open .audio-modal__content {
  transform: translateY(0);
}

.audio-modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}

.audio-modal__content {
  position: relative;
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  max-width: 340px;
  width: 90%;
  z-index: 1;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.audio-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.audio-modal__title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
}

.audio-modal__close {
  background: none;
  border: none;
  font-size: 2.4rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
}

.audio-modal__close:hover {
  color: #333;
}

.audio-modal__body {
  text-align: center;
}

.audio-modal__body iframe {
  border: none;
  max-width: 100%;
}

/* 非表示ユーティリティ */
.manifesto-hidden {
  display: none;
}

@media (max-width: 767px) {
  .manifesto-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .manifesto-tab-btn {
    font-size: 1.4rem;
    padding: 8px 6px;
  }

  .manifesto-mode-tab {
    font-size: 1.6rem;
    padding: 8px 6px;
  }
}
