/* =====================================================
   電験3種 理論Wiki カスタムCSS
   MkDocs Material 用スタイル調整
   ===================================================== */

/* --- テーブル フォントサイズ最適化（スマホ対応） --- */
.md-typeset table {
  font-size: 0.85em;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 600px) {
  .md-typeset table {
    font-size: 0.75em;
  }

  .md-typeset th,
  .md-typeset td {
    padding: 0.4em 0.6em;
    white-space: nowrap;
  }
}

/* --- Admonition アイコン色調整（理論Wiki用） --- */
/* note: 青 — 公式・定義 */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: #448aff;
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: rgba(68, 138, 255, 0.1);
}

/* tip: 緑 — 直感・コツ */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #00bfa5;
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(0, 191, 165, 0.1);
}

/* warning: 橙 — 未検証・作成中 */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: #ff9100;
}
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  background-color: rgba(255, 145, 0, 0.1);
}

/* danger: 赤 — 頻出ミス・落とし穴 */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-color: #ff1744;
}
.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
  background-color: rgba(255, 23, 68, 0.1);
}

/* example: 紫 — 過去問・例題 */
.md-typeset .admonition.example,
.md-typeset details.example {
  border-color: #7c4dff;
}
.md-typeset .example > .admonition-title,
.md-typeset .example > summary {
  background-color: rgba(124, 77, 255, 0.1);
}

/* --- バージョンバッジ --- */
.version-badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-size: 0.75em;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 0.3em;
}

.version-badge.v05 {
  background-color: #ff9100;
  color: #fff;
}

.version-badge.v07 {
  background-color: #448aff;
  color: #fff;
}

.version-badge.v10 {
  background-color: #00c853;
  color: #fff;
}

/* placeholder バッジ */
.version-badge.placeholder {
  background-color: #9e9e9e;
  color: #fff;
}

/* --- テーブル内MathJax数式の見やすさ向上 --- */
.md-typeset td .MathJax,
.md-typeset th .MathJax {
  font-size: 1.15em !important;
}

/* 数式ブロック横スクロール（全画面） */
.md-typeset .arithmatex {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- 数式ブロック 左右パディング調整（スマホ） --- */
@media screen and (max-width: 600px) {
  .md-typeset .arithmatex {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5em 0;
  }
}
