/* ==========================================
   notice.css
   お知らせ（NOTICE）機能 一覧・詳細＆マークダウン用スタイル
========================================== */

/* ---- 一覧・詳細コンテナ ---- */
.notice-page {
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

/* 一覧アイテムカード（コンテストカードやリストと統一感を持たせたデザイン） */
.notice-list {
  display: flex;
  flex-direction: column;
}

.notice-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  background-color: rgba(128, 128, 128, 0.05);
}

.notice-item-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notice-item-date {
  font-family: 'Silkscreen', cursive;
  font-size: 0.8rem;
  color: var(--nav-link-color);
  letter-spacing: 0.05em;
}

.notice-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.notice-item:hover .notice-item-title {
  color: var(--accent-color, #3b82f6);
}

.notice-item-summary {
  font-size: 0.875rem;
  color: var(--nav-link-color);
  margin: 0;
  line-height: 1.6;
}

/* ---- 詳細ページレイアウト ---- */
.notice-detail-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.notice-detail-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.notice-detail-title {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.4;
  margin: 0;
  color: var(--text-color);
}

.notice-detail-actions {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---- マークダウン描画エリア (.notice-markdown) ---- */
.notice-markdown {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-color);
}

.notice-markdown p {
  margin: 0 0 1.25rem 0;
}

.notice-markdown h1,
.notice-markdown h2,
.notice-markdown h3,
.notice-markdown h4 {
  font-weight: 700;
  color: var(--text-color);
  margin: 2rem 0 1rem 0;
  line-height: 1.4;
}

.notice-markdown h1 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.notice-markdown h2 {
  font-size: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-color);
}

.notice-markdown h3 {
  font-size: 1.1rem;
}

.notice-markdown ul,
.notice-markdown ol {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}

.notice-markdown li {
  margin-bottom: 0.5rem;
}

.notice-markdown strong {
  font-weight: 700;
  color: var(--text-color);
}

/* テーブル（表）装飾 - contestsテーブルと同様にシャープ＆モダン */
.notice-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.notice-markdown th,
.notice-markdown td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.notice-markdown th {
  background-color: rgba(128, 128, 128, 0.08);
  font-weight: 700;
}

.notice-markdown tr:hover td {
  background-color: rgba(128, 128, 128, 0.04);
}

/* 引用ブロック */
.notice-markdown blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--border-color);
  background-color: rgba(128, 128, 128, 0.05);
  color: var(--nav-link-color);
}

/* コード装飾 */
.notice-markdown code {
  font-family: monospace;
  font-size: 0.85em;
  background-color: rgba(128, 128, 128, 0.12);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

.notice-markdown pre {
  background-color: rgba(128, 128, 128, 0.08);
  border: 1px solid var(--border-color);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.notice-markdown pre code {
  background-color: transparent;
  padding: 0;
}

/* リンク */
.notice-markdown a,
.notice-related-link {
  color: #2563eb;
  text-decoration: underline;
  word-break: break-all;
}

html.dark .notice-markdown a,
html.dark .notice-related-link {
  color: #38bdf8;
}

.notice-markdown a:hover,
.notice-related-link:hover {
  text-decoration: none;
}
