/* css/styles.css */
.prose {
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.5;
  max-width: none;
}

.prose h1 {
  color: #1a202c;
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 1rem;
}

.prose h2 {
  color: #1a202c;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  color: #1a202c;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose h4 {
  color: #1a202c;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.prose a {
  color: #3182ce;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #2c5282;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
  line-height: 1.6;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  color: #4a5568;
}

.prose li > p {
  margin-bottom: 0;
}

.prose li::marker {
  color: #2d3748;
  font-weight: 600;
}

.prose code {
  background-color: #f7fafc;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #e53e3e;
}

.prose pre {
  background-color: #1a202c;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* サイドバーのスタイル調整 */
#docs-list > li.py-2 {
  background-color: #e2e8f0;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0.5rem;
  border-radius: 0.25rem;
}

#docs-list > ul.space-y-1 {
  margin-bottom: 0.75rem;
}

#docs-list a.block {
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

#docs-list a.block:hover {
  background-color: #f7fafc;
  color: #2c5282;
}

#docs-list a.active {
  background-color: #e3f2fd; /* アクティブ時の背景 */
  color: #1e40af; /* アクティブ時のテキスト */
  border-left: 4px solid #3182ce; /* 左ボーダー */
  padding-left: 0.5rem; /* ボーダー分調整 */
  font-weight: 600; /* 強調 */
}

#sidebar.open {
  transform: translateX(0);
}

@media (max-width: 767px) {
  main {
    margin-left: 0 !important;
  }
}

#doc-body.prose {
  display: block !important;
  min-height: 100px;
}

/* テーブルスタイル */
.prose table {
  width: 100%;
  border-collapse: collapse; /* ボーダーを結合 */
  margin-bottom: 1rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0; /* 外枠 */
  border-radius: 0.375rem; /* 角丸 */
  overflow: hidden; /* 角丸を有効に */
}

.prose thead {
  background-color: #edf2f7; /* ヘッダー背景 */
}

.prose th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.875rem;
  border-bottom: 2px solid #e2e8f0; /* ヘッダー下線 */
}

.prose td {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #4a5568;
  border-bottom: 1px solid #e2e8f0; /* セル下線 */
}

.prose tr:last-child td {
  border-bottom: none; /* 最後の行は下線なし */
}

.prose th, .prose td {
  border-right: 1px solid #e2e8f0; /* セル右線 */
}

.prose th:last-child, .prose td:last-child {
  border-right: none; /* 最後の列は右線なし */
}

/* レスポンシブ対応: スマホでテーブルをスクロール可能に */
.prose .table-container {
  overflow-x: auto;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .prose table {
    font-size: 0.75rem; /* スマホでフォント縮小 */
  }
  .prose th, .prose td {
    padding: 0.5rem; /* スマホでパディング縮小 */
  }
}