/* ============================================
   FAQ ページスタイル
   Markdown ベース FAQ 表示用
   ============================================ */

/* =====================
   レイアウト
   ===================== */
.faq-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 4px 0 20px;
}

/* =====================
   左サイドバー
   ===================== */
.faq-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}
.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #409EFF, #3a8ee6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(64,158,255,0.25);
}
.sidebar-header-icon i {
    color: #fff;
    font-size: 16px;
}
.sidebar-header-text {
    font-size: 15px;
    font-weight: 700;
    color: #121620;
    letter-spacing: 0.02em;
}

/* サイドバーナビゲーション */
.sidebar-nav {
    padding: 8px 0;
}
.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.18s ease;
    border-left: 3px solid transparent;
    gap: 10px;
}
.nav-item:hover {
    background-color: #f5f8ff;
    color: #409EFF;
}
.nav-item:hover .nav-icon {
    color: #409EFF;
}
.nav-item.active {
    background-color: #ecf5ff;
    color: #409EFF;
    font-weight: 600;
    border-left-color: #409EFF;
}
.nav-item.active .nav-icon {
    color: #409EFF;
}
.nav-item.active .nav-count {
    background: #409EFF;
    color: #fff;
}
.nav-icon {
    font-size: 16px;
    color: #909399;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.18s ease;
}
.nav-label {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-count {
    font-size: 11px;
    font-weight: 600;
    color: #909399;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.18s ease;
    min-width: 26px;
    text-align: center;
}
.nav-divider {
    height: 1px;
    background: #ebeef5;
    margin: 4px 20px;
}

/* =====================
   右メインコンテンツ
   ===================== */
.faq-main {
    flex: 1;
    min-width: 0;
}
.faq-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

/* =====================
   ページヘッダー
   ===================== */
.faq-page-header {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
    border-bottom: 2px solid #409EFF;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-page-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.faq-page-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #409EFF, #3a8ee6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(64,158,255,0.3);
}
.faq-page-header-icon i {
    color: #fff;
    font-size: 20px;
}
.faq-page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #121620;
    margin: 0;
    letter-spacing: 0.02em;
}
.faq-total {
    font-size: 13px;
    color: #7a8599;
    background: #fff;
    padding: 4px 14px;
    border-radius: 16px;
    font-weight: 500;
    border: 1px solid #e4eaf2;
}

/* =====================
   検索バー
   ===================== */
.faq-search-bar {
    background: #fff;
    padding: 18px 28px;
    border-bottom: 1px solid #ebeef5;
}
.faq-search-bar .el-input__inner {
    font-size: 14px;
    border-radius: 8px;
    height: 42px;
    border-color: #dcdfe6;
    transition: all 0.2s ease;
}
.faq-search-bar .el-input__inner:focus {
    border-color: #409EFF;
    box-shadow: 0 0 0 3px rgba(64,158,255,0.1);
}

/* =====================
   セクション
   ===================== */
.faq-section {
    border-bottom: 1px solid #ebeef5;
}
.faq-section:last-child {
    border-bottom: none;
}
.faq-section-header {
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fb;
    border-bottom: 1px solid #ebeef5;
}
.faq-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #ecf5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.faq-section-icon i {
    font-size: 14px;
    color: #409EFF;
}
.faq-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #121620;
    letter-spacing: 0.02em;
}
.faq-section-count {
    font-size: 12px;
    color: #909399;
    margin-left: auto;
}

/* =====================
   FAQ項目
   ===================== */
.faq-item {
    border-bottom: 1px solid #f2f3f5;
    transition: background-color 0.15s ease;
}
.faq-item:last-child {
    border-bottom: none;
}

/* 質問 */
.faq-question {
    padding: 18px 28px;
    font-size: 14px;
    font-weight: 500;
    color: #1e2a36;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.18s ease;
    user-select: none;
}
.faq-question:hover {
    background-color: #fcfcfd;
    color: #409EFF;
}
.faq-question.active {
    color: #409EFF;
}

/* Qバッジ */
.faq-q-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #409EFF, #3a8ee6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(64,158,255,0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.faq-question:hover .faq-q-badge {
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(64,158,255,0.3);
}
.faq-q-text {
    flex: 1;
    line-height: 1.5;
}

/* 矢印 */
.faq-q-arrow {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-q-arrow i {
    font-size: 13px;
    color: #909399;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}
.faq-question:hover .faq-q-arrow {
    background: #ecf5ff;
}
.faq-question:hover .faq-q-arrow i {
    color: #409EFF;
}
.faq-question.active .faq-q-arrow {
    background: #ecf5ff;
}
.faq-question.active .faq-q-arrow i {
    color: #409EFF;
    transform: rotate(90deg);
}

/* =====================
   回答エリア
   ===================== */
.faq-answer {
    padding: 0 28px 22px 70px;
    font-size: 14px;
    color: #333;
    line-height: 1.85;
    position: relative;
}
.faq-answer::before {
    content: '';
    position: absolute;
    left: 41px;
    top: 0;
    bottom: 22px;
    width: 2px;
    background: linear-gradient(to bottom, #c6e2ff, #ecf5ff);
    border-radius: 1px;
}

/* 回答内テキスト */
.faq-answer p {
    margin-bottom: 12px;
    color: #333;
}
.faq-answer ol {
    padding-left: 0;
    margin-bottom: 14px;
    counter-reset: step;
    list-style: none;
}
.faq-answer ol li {
    margin-bottom: 6px;
    padding-left: 24px;
    position: relative;
    counter-increment: step;
}
.faq-answer ol li::before {
    content: counter(step) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #409EFF;
    font-size: 13px;
    font-weight: 600;
    line-height: inherit;
}
.faq-answer ul {
    padding-left: 20px;
    margin-bottom: 14px;
}
.faq-answer ul li {
    margin-bottom: 8px;
}
.faq-answer ul li::marker {
    color: #409EFF;
}
.faq-answer h3 {
    font-size: 15px;
    font-weight: 600;
    color: #e6a23c;
    margin: 20px 0 10px;
    padding: 0 0 6px 0;
    border-bottom: 1px solid #ebeef5;
    background: none;
}
.faq-answer h3:first-child {
    margin-top: 4px;
}
.faq-answer strong {
    color: #1e2a36;
    font-weight: 600;
}
/* テーブル */
.faq-answer table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}
.faq-answer table th,
.faq-answer table td {
    border: 1px solid #ebeef5;
    padding: 10px 16px;
    text-align: left;
}
.faq-answer table th {
    background: #f8f9fb;
    color: #363c48;
    font-weight: 600;
    font-size: 13px;
}
.faq-answer table td {
    color: #333;
}
.faq-answer table tr:hover td {
    background: #fafcff;
}

/* リンク */
.faq-answer a {
    color: #409EFF;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease;
}
.faq-answer a:hover {
    border-bottom-color: #409EFF;
}
.faq-answer code {
    background: #f4f4f5;
    color: #e6a23c;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* 注意書き（Markdownの > blockquote から変換） */
.faq-answer .faq-note {
    background: linear-gradient(135deg, #fdf6ec, #fef9f0);
    border-left: 3px solid #e6a23c;
    padding: 12px 16px;
    margin: 14px 0 4px;
    font-size: 13px;
    color: #8a6d3b;
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
}
.faq-answer .faq-note p {
    margin-bottom: 0;
    color: #8a6d3b;
}

/* =====================
   検索結果なし
   ===================== */
.faq-no-results {
    padding: 72px 24px;
    text-align: center;
    color: #909399;
}
.faq-no-results-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f5f7fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.faq-no-results-icon i {
    font-size: 28px;
    color: #c0c4cc;
}
.faq-no-results p {
    font-size: 14px;
    color: #909399;
    margin-bottom: 4px;
}
.faq-no-results .faq-no-results-hint {
    font-size: 13px;
    color: #b0b6bf;
}

/* =====================
   トランジション
   ===================== */
.faq-answer-enter-active {
    animation: faqAnswerIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer-leave-active {
    animation: faqAnswerOut 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes faqAnswerIn {
    from { opacity: 0; max-height: 0; transform: translateY(-8px); }
    to { opacity: 1; max-height: 600px; transform: translateY(0); }
}
@keyframes faqAnswerOut {
    from { opacity: 1; max-height: 600px; }
    to { opacity: 0; max-height: 0; }
}

/* =====================
   レスポンシブ
   ===================== */
@media (max-width: 991px) {
    /* レイアウト */
    .faq-layout {
        flex-direction: column !important;
        gap: 0 !important;
        margin: 0 !important;
    }
    .faq-sidebar {
        width: 100% !important;
        position: static !important;
    }
    .faq-main {
        width: 100%;
    }

    /* サイドバー：横スクロールタグ */
    .sidebar-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1px solid #ebeef5 !important;
        background: #fff;
    }
    .sidebar-header {
        display: none;
    }
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px 16px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-nav::after {
        content: '';
        flex-shrink: 0;
        width: 8px;
    }
    .nav-item {
        padding: 8px 16px;
        border-left: none !important;
        border-radius: 20px;
        white-space: nowrap;
        flex-shrink: 0;
        border: 1px solid #dcdfe6;
        gap: 6px;
        min-height: 36px;
        font-size: 13px;
    }
    .nav-item.active {
        border-color: #409EFF;
        background: #ecf5ff;
        padding-left: 16px !important;
        font-weight: 600;
    }
    .nav-count {
        font-size: 10px;
        padding: 1px 6px;
        min-width: 22px;
    }
    .nav-divider { display: none; }

    /* メインカード */
    .faq-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* ページヘッダー */
    .faq-page-header {
        padding: 14px 16px;
        border-bottom-width: 1px;
    }
    .faq-page-header h1 { font-size: 16px; }
    .faq-page-header-icon { width: 32px; height: 32px; border-radius: 8px; }
    .faq-page-header-icon i { font-size: 16px; }
    .faq-page-header-left { gap: 10px; }
    .faq-total { font-size: 12px; padding: 3px 10px; }

    /* 検索バー */
    .faq-search-bar { padding: 12px 16px; }

    /* 質問行（タッチターゲット44px以上） */
    .faq-question {
        padding: 14px 16px;
        gap: 10px;
        min-height: 48px;
    }
    .faq-q-badge {
        width: 24px; height: 24px;
        font-size: 11px; border-radius: 6px;
        box-shadow: 0 1px 3px rgba(64,158,255,0.15);
    }
    .faq-q-text { font-size: 14px; }
    .faq-q-arrow { width: 24px; height: 24px; }
    .faq-q-arrow i { font-size: 12px; }

    /* 回答エリア */
    .faq-answer {
        padding: 0 16px 16px 48px;
        font-size: 13px;
        line-height: 1.75;
    }
    .faq-answer::before { left: 27px; }
    .faq-answer p { margin-bottom: 10px; }
    .faq-answer ol li { padding-left: 22px; margin-bottom: 5px; }
    .faq-answer ol li::before { font-size: 12px; }
    .faq-answer ul { padding-left: 16px; }
    .faq-answer ul li { margin-bottom: 6px; }
    .faq-answer .faq-note {
        padding: 10px 12px;
        font-size: 12px;
        margin: 10px 0 4px;
    }
    .faq-answer h3 { font-size: 14px; margin: 14px 0 6px; }

    /* セクションヘッダー */
    .faq-section-header { padding: 12px 16px; }
    .faq-section-icon { width: 24px; height: 24px; }
    .faq-section-icon i { font-size: 12px; }
    .faq-section-title { font-size: 14px; }
    .faq-section-count { font-size: 11px; }

    /* 検索結果なし */
    .faq-no-results { padding: 48px 16px; }
    .faq-no-results-icon { width: 52px; height: 52px; }
    .faq-no-results-icon i { font-size: 22px; }
}

/* =====================
   prefers-reduced-motion
   ===================== */
@media (prefers-reduced-motion: reduce) {
    .faq-answer-enter-active,
    .faq-answer-leave-active {
        animation-duration: 0.01ms !important;
    }
    .faq-q-badge,
    .faq-q-arrow,
    .faq-q-arrow i,
    .nav-item,
    .nav-count,
    .faq-question {
        transition-duration: 0.01ms !important;
    }
}
