/* =====================================================
   My TOC - 目次スタイル
   ===================================================== */

.my-toc {
    margin: 1.5em 0 2em;
}

/* details / summary ---------------------------------- */

.my-toc details {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
}

.my-toc summary {
    padding: 0.75em 1em;
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    user-select: none;
    list-style: none; /* デフォルトの三角を非表示 */
    display: flex;
    align-items: center;
    gap: 0.5em;
}

/* サマリーの左にアイコン */
.my-toc summary::before {
    content: "▶";
    font-size: 0.7em;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* 開いたときに回転 */
.my-toc details[open] > summary::before {
    transform: rotate(90deg);
}

/* Chromeなどのデフォルトマーカーを非表示 */
.my-toc summary::-webkit-details-marker {
    display: none;
}

/* リスト -------------------------------------------- */

.my-toc ol {
    margin: 0;
    padding: 0.5em 1em 1em 2.2em;
    list-style-type: decimal;
}

.my-toc li {
    margin: 0.4em 0;
    font-size: 0.9em;
    line-height: 1.6;
}

/* H3のインデント */
.my-toc li.toc-item-h3 {
    margin-left: 1.2em;
    list-style-type: disc;
    font-size: 0.85em;
}

/* リンク */
.my-toc a {
    text-decoration: none;
    color: #333;
}

.my-toc a:hover {
    text-decoration: underline;
    color: #0073aa; /* WordPressデフォルトカラー */
}
