@charset 'utf-8';
/**
 * 動画講座ページ専用 TOC目次メニュー
 */

/* TOCボタン（六角形） */
.video-toc-wrap{
    position: absolute;
    top: 0;
    right: 0;
    width: var(--header-height);
    height: 100%;
    z-index: 10;
}
.video-toc-trigger{
    position: absolute;
    display: block;
    width: 55px;
    height: calc(55px * 0.866);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgb(var(--light-blue));
    border: none;
    cursor: pointer;
    transition: opacity .3s;
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.video-toc-trigger:before{
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: #fff;
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.video-toc-trigger:hover{
    opacity: .8;
}
.video-toc-trigger-text{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--light-blue));
    letter-spacing: .05em;
    z-index: 1;
}

/* パネル（ドロップダウン） */
.video-toc-panel{
    position: absolute;
    top: var(--header-height);
    right: 0;
    width: 380px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease;
    z-index: 99;
}
#tocToggle:checked ~ .video-toc-panel{
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
}
#tocToggle:checked ~ .video-toc-trigger{
    background: rgba(var(--light-blue), .4);
}

/* パネル内部 */
.video-toc-nav{
    background: #f2fafd;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* リスト */
.video-toc-list{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 各項目 */
.video-toc-item{
    position: relative;
    padding-left: 5px;
}
.video-toc-item:before{
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    background: #15a3df;
}
.video-toc-link{
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
    padding: 10px 10px 10px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    line-height: 1.4;
    transition: background .2s, color .2s;
}
.video-toc-link:hover{
    background: rgba(var(--light-blue), .08);
    color: rgb(var(--light-blue));
}
.video-toc-link-sub{
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-top: 2px;
}

/* CTAボタン */
.video-toc-cta{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 64px;
    background: #6472ba;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    transition: background .3s;
    margin-top: 5px;
}
.video-toc-cta:hover{
    background: #525fa3;
}

/* ===== SP & タブレット（〜1049px） ===== */
@media(max-width: 1049px){
    .video-toc-wrap{
        right: var(--header-height);
    }
    .video-toc-panel{
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
    }
    .video-toc-nav{
        border-radius: 0 0 8px 8px;
        margin: 0 10px;
        max-height: calc(100vh - var(--header-height) - 20px);
        overflow-y: auto;
    }
}

/* ===== PC（1050px〜） ===== */
@media(min-width: 1050px){
    .video-toc-wrap{
        right: 10px;
    }
    /* ヘッダーナビにTOC分のスペースを確保 */
    .video-course-page .header-nav{
        padding-left: var(--header-height);
        padding-right: var(--header-height);
    }
}
