/* css/support_sidebar.css */

.ss-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* メイン側 */
.ss-layout .ss-col-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* 右サイドバー */
.ss-layout .ss-right {
    width: 320px;
    flex: 0 0 320px;
    position: sticky;
    top: 12px;
}

/* カード */
.ss-right-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    backdrop-filter: blur(6px);
}

.ss-right-title {
    font-size: 14px;
    font-weight: 900;
    margin: 0 0 10px;
}

.ss-right-box {
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
}

.ss-right-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ss-rbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 900;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .18);
}

.ss-rbtn-primary {
    background: #fff;
    color: #111;
}

.ss-rbtn-ghost {
    background: rgba(255, 255, 255, .10);
    color: #fff;
}

.ss-right-note {
    margin: 10px 0 0;
    font-size: 12px;
    opacity: .9;
}

.ss-right-list {
    margin: 0;
    padding-left: 18px;
}

/* スマホは右サイドバーを出さない */
@media (max-width: 960px) {
    .ss-layout {
        display: block;
    }

    .ss-layout .ss-right {
        display: none;
    }
}

/* ===============================
   support_sidebar.css
   学習支援：右サイドバー固定（PC）
=============================== */

/* 2カラム */
.ss-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--width-right);
    gap: 14px;
    align-items: start;
}

/* メイン */
.ss-col-main {
    min-width: 0;
}

/* 右サイドバー：PCで固定（sticky） */
.ss-right {
    position: sticky;
    top: 70px;
    /* ヘッダー高さ + 余白（必要なら調整） */
    align-self: start;

    /* サイドバー自体をスクロールさせない */
    height: calc(100vh - 70px - 16px);
    overflow: hidden;

    /* クリックが死ぬ系の保険（必要なら） */
    z-index: 20;
}

/* 中のカードも高さに収める */
.ss-right-card {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* スマホは固定しない（1カラムで自然に下へ） */
@media (max-width: 950px) {
    .ss-layout {
        grid-template-columns: 1fr;
    }

    .ss-right {
        position: static;
        height: auto;
        overflow: visible;
        top: auto;
    }
}

/* ===============================
   PC: 右サイドバー fixed + メインを自動で広げる（予約列を消す）
=============================== */
@media (min-width: 951px) {
    :root {
        --ss-right-w: 260px;
        /* ← 好きな幅に */
        --ss-right-gap: 16px;
        /* 右端の余白 */
        --ss-right-top: 70px;
        /* 上の固定位置（ヘッダー分） */
    }
}

/* =========================================
   Mobile support panel: buttons readability
   (<=950px only)
========================================= */
@media (max-width: 950px) {

    /* ドロワー/パネル内の右サイド相当のカードを想定して、ボタンを読みやすく */
    .support-panel .ss-right-card,
    .support-panel .support-right-card,
    .support-panel .ss-right-actions,
    .support-panel .support-right-actions {
        width: 100%;
    }

    /* ボタンをフル幅 + タップしやすく */
    .support-panel .ss-rbtn,
    .support-panel .support-right-card .ss-rbtn,
    .support-panel a.ss-rbtn,
    .support-panel button.ss-rbtn {
        width: 100%;
        min-height: 48px;
        padding: 14px 14px;
        font-size: 15px;
        border-radius: 14px;
        line-height: 1.2;
        letter-spacing: .2px;
    }

    /* Primaryをより見やすく（白ボタンが背景に埋もれる場合の対策） */
    .support-panel .ss-rbtn-primary {
        background: #ffffff;
        color: #111111;
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }

    /* GhostもコントラストUP */
    .support-panel .ss-rbtn-ghost {
        background: rgba(255, 255, 255, 0.14);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.22);
    }

    /* ボタン間隔を広げる */
    .support-panel .ss-right-actions,
    .support-panel .support-right-actions {
        gap: 12px;
        margin-top: 12px;
    }

    /* タイトルも少し大きく */
    .support-panel .ss-right-title,
    .support-panel .support-right-title {
        font-size: 16px;
        font-weight: 900;
        margin-bottom: 12px;
    }

    /* カード自体も余白増やす */
    .support-panel .ss-right-card,
    .support-panel .support-right-card {
        padding: 16px;
        border-radius: 16px;
    }
}