/* 記事表示エリア共有スタイル */
/* 公開ページと管理画面のプレビューで共通使用 */

/* 記事コンテナ（背景、フォント、余白） */
.article-content {
    background-color: #27272a; /* bg-primary-100 dark */
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #d4d4d8; /* text-primary-600 dark */
    font-size: 0.9375rem; /* 15px */
    line-height: 1.7;
    padding: 1.5rem;
    border-radius: 0.375rem;
}

/* Markdown コンテンツ用スタイル */
.markdown-content {
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9375rem; /* 15px */
    line-height: 1.7;
    color: #d4d4d8; /* text-primary-600 dark */
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}
.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.25rem; border-bottom: 1px solid #dee2e6; padding-bottom: 0.3em; }
.markdown-content h3 { font-size: 1.125rem; }
.markdown-content h4 { font-size: 1rem; }

.markdown-content p {
    margin-bottom: 1em;
    line-height: 1.8;
}

/* コードブロック（シンタックスハイライト対応） */
.markdown-content pre {
    background-color: #18181b;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #3f3f46;
}
.markdown-content code {
    font-family: 'Fira Code', 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8125rem; /* 13px */
}
.markdown-content :not(pre) > code {
    background-color: #3f3f46;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: #e4e4e7;
}

/* テーブル */
.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}
.markdown-content th,
.markdown-content td {
    border: 1px solid #3f3f46;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.markdown-content th {
    background-color: #3f3f46;
    font-weight: 600;
}
.markdown-content tr:nth-child(even) {
    background-color: #27272a;
}

/* 引用 */
.markdown-content blockquote {
    border-left: 4px solid #52525b;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #a1a1aa;
    font-style: italic;
    font-size: 0.875rem; /* text-sm */
}

/* リスト */
.markdown-content ul,
.markdown-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.markdown-content li {
    margin-bottom: 0.25rem;
    line-height: 1.6;
}
/* 入れ子リストの余白調整 */
.markdown-content li > ul,
.markdown-content li > ol {
    margin: 0.25rem 0;
}

/* 箇条書き: 階層ごとに異なるマーカー */
.markdown-content ul {
    list-style-type: disc;
}
.markdown-content ul ul {
    list-style-type: circle;
}
.markdown-content ul ul ul {
    list-style-type: square;
}

/* 番号付きリスト: 階層ごとに異なる番号スタイル */
.markdown-content ol {
    list-style-type: decimal;
}
.markdown-content ol ol {
    list-style-type: lower-alpha;
}
.markdown-content ol ol ol {
    list-style-type: lower-roman;
}

/* 混合リスト（ul内のol、ol内のul）も対応 */
.markdown-content ul ol {
    list-style-type: decimal;
}
.markdown-content ol ul {
    list-style-type: disc;
}

/* タスクリスト（チェックボックスを含むリスト項目） */
.markdown-content li:has(> input[type="checkbox"]) {
    list-style: none;
    margin-left: -1.25em;
}
.markdown-content input[type="checkbox"] {
    margin-right: 0.5em;
    width: 1em;
    height: 1em;
    accent-color: #a1a1aa;
    vertical-align: middle;
}

/* リンク */
.markdown-content a {
    color: #e4e4e7;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.markdown-content a:hover {
    color: #fafafa;
}

/* 水平線 */
.markdown-content hr {
    border: none;
    border-top: 1px solid #3f3f46;
    margin: 2rem 0;
}

/* 画像 */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* 取り消し線 */
.markdown-content del {
    color: #71717a;
}
