/* レスポンシブ横スクロールテーブル（個別ON/OFF機能付き） */

.table-scrollable {
    position: relative;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.detail_free table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.detail_free .is-scrollable-non table {
    min-width: 100%;
}

caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    padding-bottom: 10px;
}



/* スクロールヒントのスタイル */
.table-scrollable::after {
    content: '→ スクロール';
    position: absolute;
    top: 0px;
    right: 0px;
    width: auto;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 1;
}

.table-scrollable.is-scrollable::after {
    opacity: 1;
}

/* 個別トグルのスタイル */
.individual-scroll-toggle-wrapper {
    margin-bottom: 10px;
    padding: 4px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    display: none;
}

.individual-scroll-toggle-wrapper label {
    cursor: pointer;
    margin-left: 5px;
    margin-bottom: 0px;
}



/* 目次表示 */
/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* 全体的なスタイル */
#toc {
    display: none;
    max-width: 500px;
    border: 1px solid #ddd;
    margin: 0 auto 24px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 7px;
    overflow: hidden;
}

/* スマートフォン表示時のみ目次を表示 */
@media screen and (max-width: 767px) {
    #toc {
        display: block;
    }

    #normalModeButton,
    #printModeButton {
        display: none !important;
    }
}

.toc-title {
    background-color: #f8f8f8;
    /* タイトル背景を薄いグレーに */
    padding: .8em 1.2em;
    /* パディングを調整 */
    font-weight: bold;
    cursor: pointer;
    /* クリック可能であることを示すカーソル */
    border-bottom: 1px solid #eee;
    /* タイトル下に区切り線 */
}

.toggle-icon {
    float: right;
    /* 右寄せ */
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #777;
    /* 下向きの三角形（開く状態） */
    margin-top: 0.5em;
    /* 位置調整 */
    transition: transform 0.2s ease-in-out;
    /* アニメーション */
}

#toc.open .toggle-icon {
    transform: rotate(180deg);
    /* 閉じる状態（上向きの三角形） */
}

.toc-content {
    padding: 1em 0;
    /* 目次内容の上下パディング */
    display: none;
    /* デフォルトでは非表示 */
}

#toc.open .toc-content {
    display: block;
    /* 開いている時に表示 */
}


.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0.5rem 0 0;
}

.toc-content ul ul {
    margin-left: 20px;
    border-top: 1px dashed #eee;
}

.toc-content li {
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.toc-content li:last-child {
    border-bottom: none;
}

.toc-content li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.8em 0;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.toc-content>ul>li>a::before {
    content: '‣';
    font-size: 1rem;
    color: #6c757d;
    margin-right: 0.7em;
    transition: color 0.3s ease;
}

.toc-content ul li a {
    font-size: 0.85rem;
    padding: 0.6em 0;
}

.toc-content ul li a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #666;
    margin-right: 0.5em;
    vertical-align: middle;
    transition: border-left-color 0.3s ease;
}

.toc-content>ul>ul>li a {
    font-weight: 700;
}

.toc-content>ul>ul>li a::before {
    display: none;
}


/* 　印刷ページ表示　 */
#normalModeButton,
#printModeButton {
    background-color: #FFF;
    color: #555;
    font-weight: normal;
    font-size: 0.85rem;
    padding: 2px 0.6rem;
    border: solid 1px gainsboro;
}