/**
 * SimCzech Forum Professional Styles – v41
 * Plně admin-editovatelný přes CSS proměnné
 * Nastavení: /admin/config/simczech/forum
 */

/* ============================================
   CSS VARIABLES (defaults, overridden by admin)
   ============================================ */
:root {
  --sc-forum-primary: #1a73e8;
  --sc-forum-primary-hover: #1557b0;
  --sc-forum-container-bg: #e8f0fe;
  --sc-forum-container-border: #1a73e8;
  --sc-forum-container-text: #1a73e8;
  --sc-forum-row-hover: #f8fafc;
  --sc-forum-table-bg: #ffffff;
  --sc-forum-header-bg: #f1f5f9;
  --sc-forum-header-text: #475569;
  --sc-forum-border: #e2e8f0;
  --sc-forum-title: #1e293b;
  --sc-forum-meta: #64748b;
  --sc-forum-body-text: #334155;
  --sc-forum-sticky-bg: #fffbeb;
  --sc-forum-sticky-border: #f59e0b;
  --sc-forum-comment-bg: #f8fafc;
  --sc-forum-comment-border: #e2e8f0;
  --sc-forum-nested-border: #1a73e8;
  --sc-forum-comment-radius: 8px;
  --sc-forum-max-width: 1100px;
  --sc-forum-table-radius: 8px;
  --sc-forum-node-max-width: 900px;
  --sc-forum-font-size: 0.95rem;
}

/* ============================================
   FORUM HLAVNÍ STRÁNKA
   ============================================ */

.path-forum .region-content,
.forum-list {
  max-width: var(--sc-forum-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Kontejner (kategorie) – nadpis sekce */
.forum .forum__container-title,
.forum-list__container > h2,
.forum-list__container > h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sc-forum-container-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 1rem;
  background: var(--sc-forum-container-bg);
  border-left: 4px solid var(--sc-forum-container-border);
  border-radius: 4px;
  margin: 1.5rem 0 0.25rem;
}

/* Forum tabulky — class-based AND Drupal core id-based */
table.forum-table,
table[id^="forum-topic-"],
.forum-table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.25rem;
  background: var(--sc-forum-table-bg);
  border-radius: var(--sc-forum-table-radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
  font-size: var(--sc-forum-font-size);
}

table.forum-table thead th,
table[id^="forum-topic-"] thead th,
table.forum-topic-list thead th {
  background: var(--sc-forum-header-bg);
  color: var(--sc-forum-header-text);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--sc-forum-border);
  text-align: left;
}

table[id^="forum-topic-"] thead th a {
  color: var(--sc-forum-header-text);
  text-decoration: none;
}

table[id^="forum-topic-"] thead th a:hover {
  color: var(--sc-forum-primary);
}

table.forum-table tbody td,
table[id^="forum-topic-"] tbody td,
table.forum-topic-list tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  color: var(--sc-forum-body-text);
  font-size: var(--sc-forum-font-size);
  border-bottom: 1px solid var(--sc-forum-border);
}

table.forum-table tbody tr:hover,
table[id^="forum-topic-"] tbody tr:hover,
table.forum-topic-list tbody tr:hover {
  background-color: var(--sc-forum-row-hover);
  transition: background-color 0.15s;
}

table.forum-table tbody tr:last-child td,
table[id^="forum-topic-"] tbody tr:last-child td,
table.forum-topic-list tbody tr:last-child td {
  border-bottom: none;
}

/* Drupal core forum cells */
td.forum__topic {
  width: auto;
}

td.forum__topic .forum__title a {
  color: var(--sc-forum-title);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.15s;
}

td.forum__topic .forum__title a:hover {
  color: var(--sc-forum-primary);
}

td.forum__topic .forum__title > div:last-child {
  font-size: 0.8rem;
  color: var(--sc-forum-meta);
  margin-top: 0.2rem;
}

td.forum__topic .forum__title > div:last-child span {
  color: var(--sc-forum-meta);
}

td.forum__replies {
  text-align: center;
  color: var(--sc-forum-meta);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  width: 100px;
}

td.forum__last-reply {
  font-size: 0.82rem;
  color: var(--sc-forum-meta);
  white-space: nowrap;
  width: 140px;
}

/* Forum icon */
.forum__icon {
  width: 40px;
  text-align: center;
}

.forum__icon .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--sc-forum-container-bg);
  border-radius: 50%;
  color: var(--sc-forum-primary);
  font-size: 0.9rem;
}

/* Forum name */
td.forum__name a,
.forum-list__forum-name a {
  color: var(--sc-forum-title);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.15s;
}

td.forum__name a:hover,
.forum-list__forum-name a:hover {
  color: var(--sc-forum-primary);
}

/* Forum description */
td.forum__description,
.forum-list__forum-description,
.forum__description {
  color: var(--sc-forum-meta);
  font-size: 0.82rem;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Stats columns */
td.forum__topics,
td.forum__posts,
td.forum__replies {
  text-align: center;
  color: var(--sc-forum-meta);
  font-weight: 500;
  font-size: 0.88rem;
}

/* Last post */
td.forum__last-reply,
td.forum__last-post {
  font-size: 0.8rem;
  color: var(--sc-forum-meta);
  min-width: 150px;
}

td.forum__last-reply a,
td.forum__last-post a {
  color: var(--sc-forum-title);
  text-decoration: none;
}

td.forum__last-reply a:hover,
td.forum__last-post a:hover {
  color: var(--sc-forum-primary);
}

/* ============================================
   TOPIC LIST (uvnitř fóra)
   ============================================ */

table.forum-topic-list {
  width: 100%;
  border-collapse: collapse;
  background: var(--sc-forum-table-bg);
  border-radius: var(--sc-forum-table-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Sticky topic */
table.forum-topic-list tbody tr.sticky,
table[id^="forum-topic-"] tbody tr.sticky {
  background: var(--sc-forum-sticky-bg);
  border-left: 3px solid var(--sc-forum-sticky-border);
}

table.forum-topic-list tbody tr.sticky:hover,
table[id^="forum-topic-"] tbody tr.sticky:hover {
  background: var(--sc-forum-sticky-bg);
  filter: brightness(0.97);
}

/* Topic title (legacy selector, augmented above) */
td.forum__title a {
  color: var(--sc-forum-title);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

td.forum__title a:hover {
  color: var(--sc-forum-primary);
}

/* Sticky topics in Drupal core tables */
table[id^="forum-topic-"] tbody tr td.forum__topic div[title] {
  display: inline-block;
  margin-right: 0.25rem;
}

/* Tablesort arrow */
.tablesort {
  margin-left: 0.3rem;
}

/* ============================================
   FORUM NODE (příspěvek/téma)
   ============================================ */

.node--type-forum {
  max-width: var(--sc-forum-node-max-width);
  margin: 0 auto;
  padding: 1.25rem;
}

.node--type-forum .node__title,
.node--type-forum h1.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sc-forum-title);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

/* Author info card */
.sc-forum-author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--sc-forum-comment-bg);
  border: 1px solid var(--sc-forum-border);
  border-radius: var(--sc-forum-comment-radius);
  margin-bottom: 1rem;
}

.sc-forum-author-card .sc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sc-forum-container-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sc-forum-primary);
}

.sc-forum-author-card .sc-author-details {
  flex: 1;
}

.sc-forum-author-card .sc-author-name {
  font-weight: 600;
  color: var(--sc-forum-title);
  font-size: 0.95rem;
}

.sc-forum-author-card .sc-author-meta {
  font-size: 0.78rem;
  color: var(--sc-forum-meta);
  margin-top: 0.1rem;
}

/* Meta info */
.node--type-forum .field--name-uid,
.node--type-forum .field--name-created {
  color: var(--sc-forum-meta);
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

/* Forum tag badge */
.node--type-forum .field--name-taxonomy-forums {
  display: inline-block;
  margin-bottom: 1rem;
}

.node--type-forum .field--name-taxonomy-forums a {
  display: inline-block;
  background: var(--sc-forum-container-bg);
  color: var(--sc-forum-primary);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.node--type-forum .field--name-taxonomy-forums a:hover {
  filter: brightness(0.92);
}

/* Body text */
.node--type-forum .field--name-body {
  font-size: var(--sc-forum-font-size);
  line-height: 1.7;
  color: var(--sc-forum-body-text);
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--sc-forum-border);
}

.node--type-forum .field--name-body p { margin-bottom: 0.9rem; }
.node--type-forum .field--name-body h2 { font-size: 1.2rem; color: var(--sc-forum-title); margin: 1.25rem 0 0.6rem; }
.node--type-forum .field--name-body h3 { font-size: 1.05rem; color: var(--sc-forum-body-text); margin: 1rem 0 0.4rem; }
.node--type-forum .field--name-body ul,
.node--type-forum .field--name-body ol { margin: 0.6rem 0; padding-left: 1.5rem; }
.node--type-forum .field--name-body li { margin-bottom: 0.25rem; }
.node--type-forum .field--name-body hr { border: none; border-top: 1px solid var(--sc-forum-border); margin: 1.25rem 0; }

/* ============================================
   KOMENTÁŘE
   ============================================ */

.comment-forum-wrapper,
.field--name-comment-forum {
  margin-top: 1.5rem;
  border-top: 2px solid var(--sc-forum-border);
  padding-top: 1rem;
}

.comment-forum-wrapper > h2,
.field--name-comment-forum > h2,
.comment-forum-wrapper > .title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sc-forum-title);
  margin-bottom: 0.75rem;
}

.comment--type-comment-forum,
.comment {
  background: var(--sc-forum-comment-bg);
  border: 1px solid var(--sc-forum-comment-border);
  border-radius: var(--sc-forum-comment-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s;
  position: relative;
}

.comment--type-comment-forum:hover,
.comment:hover {
  border-color: var(--sc-forum-meta);
}

/* Nested comments */
.indented .comment {
  margin-left: 1.5rem;
  border-left: 3px solid var(--sc-forum-nested-border);
}

.indented .indented .comment {
  border-left-color: color-mix(in srgb, var(--sc-forum-nested-border), transparent 40%);
}

/* Comment meta */
.comment__meta,
.comment .field--name-uid {
  font-size: 0.8rem;
  color: var(--sc-forum-meta);
  margin-bottom: 0.4rem;
}

.comment__meta .username,
.comment .field--name-uid a {
  font-weight: 600;
  color: var(--sc-forum-title);
  text-decoration: none;
}

.comment__meta .username:hover,
.comment .field--name-uid a:hover {
  color: var(--sc-forum-primary);
}

/* Comment body */
.comment .field--name-comment-body,
.comment__content {
  font-size: var(--sc-forum-font-size);
  line-height: 1.6;
  color: var(--sc-forum-body-text);
}

/* Comment links */
.comment__links ul,
.comment .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.comment__links a,
.comment .links a {
  font-size: 0.75rem;
  color: var(--sc-forum-meta);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  transition: all 0.15s;
}

.comment__links a:hover,
.comment .links a:hover {
  color: var(--sc-forum-primary);
  background: var(--sc-forum-container-bg);
}

/* ============================================
   QUOTE BLOCK (citace)
   ============================================ */

.sc-forum-quote {
  border-left: 4px solid var(--sc-forum-primary);
  background: var(--sc-forum-header-bg);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  border-radius: 0 var(--sc-forum-comment-radius) var(--sc-forum-comment-radius) 0;
  font-size: 0.88rem;
  color: var(--sc-forum-body-text);
  position: relative;
}

.sc-forum-quote::before {
  content: "❝";
  font-size: 1.5rem;
  color: var(--sc-forum-primary);
  opacity: 0.4;
  position: absolute;
  top: 0.25rem;
  right: 0.75rem;
}

.sc-forum-quote__author {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--sc-forum-meta);
  margin-bottom: 0.25rem;
}

/* ============================================
   REPORT BUTTON
   ============================================ */

.sc-forum-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--sc-forum-meta);
  text-decoration: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  border: none;
  background: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  transition: all 0.15s;
}

.sc-forum-report-btn:hover {
  color: #dc2626;
  background: #fef2f2;
}

.sc-forum-report-btn .sc-icon {
  font-size: 0.85rem;
}

/* Report modal */
.sc-forum-report-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.sc-forum-report-modal.active {
  display: flex;
}

.sc-forum-report-modal__content {
  background: var(--sc-forum-table-bg);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.sc-forum-report-modal__content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sc-forum-title);
  margin: 0 0 1rem;
}

.sc-forum-report-modal__content select,
.sc-forum-report-modal__content textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  background: var(--sc-forum-table-bg);
  color: var(--sc-forum-body-text);
}

.sc-forum-report-modal__content textarea {
  min-height: 80px;
  resize: vertical;
}

.sc-forum-report-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.sc-forum-report-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.sc-forum-report-actions .sc-btn-cancel {
  background: var(--sc-forum-header-bg);
  color: var(--sc-forum-body-text);
}

.sc-forum-report-actions .sc-btn-submit {
  background: #dc2626;
  color: #fff;
}

.sc-forum-report-actions .sc-btn-submit:hover {
  background: #b91c1c;
}

/* ============================================
   TOPIC STATS BAR
   ============================================ */

.sc-forum-topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.6rem 1rem;
  background: var(--sc-forum-header-bg);
  border-radius: var(--sc-forum-comment-radius);
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--sc-forum-meta);
}

.sc-forum-topic-stats .sc-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sc-forum-topic-stats .sc-stat .sc-icon {
  font-size: 0.95rem;
  opacity: 0.7;
}

.sc-forum-topic-stats .sc-stat .sc-value {
  font-weight: 600;
  color: var(--sc-forum-title);
}

/* ============================================
   COMMENT FORM
   ============================================ */

.comment-form,
#comment-form,
.comment-comment-forum-form {
  background: var(--sc-forum-comment-bg);
  border: 1px solid var(--sc-forum-border);
  border-radius: var(--sc-forum-comment-radius);
  padding: 1.15rem;
  margin-top: 1.25rem;
}

.comment-form .form-item label,
#comment-form .form-item label,
.comment-comment-forum-form .form-item label {
  font-weight: 600;
  color: var(--sc-forum-body-text);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.comment-form textarea,
#comment-form textarea,
.comment-comment-forum-form textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  padding: 0.7rem;
  font-size: var(--sc-forum-font-size);
  line-height: 1.5;
  transition: border-color 0.2s;
  resize: vertical;
  background: var(--sc-forum-table-bg);
  color: var(--sc-forum-body-text);
}

.comment-form textarea:focus,
#comment-form textarea:focus,
.comment-comment-forum-form textarea:focus {
  outline: none;
  border-color: var(--sc-forum-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-forum-primary), transparent 85%);
}

.comment-form .form-submit,
#comment-form .form-submit,
.comment-comment-forum-form .form-submit {
  background: var(--sc-forum-primary);
  color: #fff;
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.4rem;
}

.comment-form .form-submit:hover,
#comment-form .form-submit:hover,
.comment-comment-forum-form .form-submit:hover {
  background: var(--sc-forum-primary-hover);
}

/* ============================================
   NEW TOPIC FORM
   ============================================ */

.node-forum-form,
.node-forum-edit-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.25rem;
}

.node-forum-form select,
.node-forum-edit-form select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  font-size: var(--sc-forum-font-size);
  color: var(--sc-forum-body-text);
  background: var(--sc-forum-table-bg);
  transition: border-color 0.2s;
}

.node-forum-form select:focus,
.node-forum-edit-form select:focus {
  outline: none;
  border-color: var(--sc-forum-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-forum-primary), transparent 85%);
}

.node-forum-form input[type="text"],
.node-forum-edit-form input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  font-size: 1rem;
  color: var(--sc-forum-title);
  font-weight: 500;
  transition: border-color 0.2s;
}

.node-forum-form input[type="text"]:focus,
.node-forum-edit-form input[type="text"]:focus {
  outline: none;
  border-color: var(--sc-forum-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-forum-primary), transparent 85%);
}

.node-forum-form .text-format-wrapper textarea,
.node-forum-edit-form .text-format-wrapper textarea {
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  padding: 0.7rem;
  font-size: var(--sc-forum-font-size);
  line-height: 1.6;
  resize: vertical;
  background: var(--sc-forum-table-bg);
  color: var(--sc-forum-body-text);
  transition: border-color 0.2s;
}

.node-forum-form .text-format-wrapper textarea:focus,
.node-forum-edit-form .text-format-wrapper textarea:focus {
  outline: none;
  border-color: var(--sc-forum-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-forum-primary), transparent 85%);
}

.node-forum-form .form-actions .button--primary,
.node-forum-form .form-actions input[type="submit"],
.node-forum-edit-form .form-actions .button--primary {
  background: var(--sc-forum-primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.8rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.node-forum-form .form-actions .button--primary:hover,
.node-forum-form .form-actions input[type="submit"]:hover,
.node-forum-edit-form .form-actions .button--primary:hover {
  background: var(--sc-forum-primary-hover);
  transform: translateY(-1px);
}

/* ============================================
   + NOVÉ TÉMA BUTTON & ACTION LINKS
   ============================================ */

.path-forum .action-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.path-forum .action-links a,
a[href*="/node/add/forum"] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--sc-forum-primary);
  color: #fff !important;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.path-forum .action-links a:hover,
a[href*="/node/add/forum"]:hover {
  background: var(--sc-forum-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Login prompt styling */
.path-forum .action-links a[href*="/user/login"] {
  background: var(--sc-forum-header-bg);
  color: var(--sc-forum-primary) !important;
  border: 1px solid var(--sc-forum-border);
  box-shadow: none;
}

.path-forum .action-links a[href*="/user/login"]:hover {
  background: var(--sc-forum-container-bg);
  border-color: var(--sc-forum-primary);
  box-shadow: none;
  transform: none;
}

/* "Nemáte oprávnění" info box */
.path-forum .region-content > p,
.path-forum .layout-content > p {
  background: var(--sc-forum-container-bg);
  border: 1px solid var(--sc-forum-border);
  border-left: 4px solid var(--sc-forum-primary);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--sc-forum-container-text);
}

/* ============================================
   SUBFORUM / CONTAINER PAGE - page title
   ============================================ */

.path-forum .page-title,
.path-forum h1.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sc-forum-title);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sc-forum-border);
}

/* View forum inside subforum pages */
.path-forum .view-forum {
  margin-top: 1.5rem;
}

.path-forum .view-forum .views-row {
  margin-bottom: 1rem;
}

/* Card styling inside forum views */
.path-forum .node--type-forum.sc-card {
  background: var(--sc-forum-table-bg);
  border: 1px solid var(--sc-forum-border);
  border-radius: var(--sc-forum-table-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.path-forum .node--type-forum.sc-card:hover {
  border-color: var(--sc-forum-primary);
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.path-forum .node--type-forum.sc-card .sc-card__body {
  padding: 1rem 1.25rem;
}

.path-forum .node--type-forum.sc-card .sc-card__title a {
  color: var(--sc-forum-title);
  text-decoration: none;
  font-weight: 600;
}

.path-forum .node--type-forum.sc-card .sc-card__title a:hover {
  color: var(--sc-forum-primary);
}

.path-forum .node--type-forum.sc-card .sc-card__meta {
  color: var(--sc-forum-meta);
  font-size: 0.8rem;
}

.path-forum .node--type-forum.sc-card .sc-card__footer {
  border-top: 1px solid var(--sc-forum-border);
  padding: 0.5rem 1.25rem;
  background: var(--sc-forum-header-bg);
}

.path-forum .node--type-forum.sc-card .sc-card__read-more {
  color: var(--sc-forum-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}

.path-forum .node--type-forum.sc-card .sc-card__read-more:hover {
  color: var(--sc-forum-primary-hover);
}

/* Hide card image placeholder for forum cards */
.path-forum .node--type-forum.sc-card .sc-card__image--placeholder {
  display: none;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.path-forum .breadcrumb {
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

.path-forum .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.2rem;
}

.path-forum .breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--sc-forum-meta);
}

.path-forum .breadcrumb li + li::before {
  content: "›";
  margin-right: 0.3rem;
  color: var(--sc-forum-border);
}

.path-forum .breadcrumb a {
  color: var(--sc-forum-primary);
  text-decoration: none;
}

.path-forum .breadcrumb a:hover {
  color: var(--sc-forum-primary-hover);
}

/* ============================================
   PAGER
   ============================================ */

.path-forum .pager {
  margin: 1.5rem 0;
}

.path-forum .pager__items {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  list-style: none;
  padding: 0;
}

.path-forum .pager__item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.4rem;
  border: 1px solid var(--sc-forum-border);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--sc-forum-body-text);
  transition: all 0.15s;
}

.path-forum .pager__item a:hover {
  background: var(--sc-forum-header-bg);
  border-color: var(--sc-forum-meta);
}

.path-forum .pager__item--active a {
  background: var(--sc-forum-primary);
  color: #fff;
  border-color: var(--sc-forum-primary);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.forum-list--empty,
.path-forum .view-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--sc-forum-meta);
  font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  table.forum-table thead th:nth-child(n+3),
  table.forum-table tbody td:nth-child(n+3),
  table[id^="forum-topic-"] thead th:nth-child(n+3),
  table[id^="forum-topic-"] tbody td:nth-child(n+3),
  table.forum-topic-list thead th:nth-child(n+3),
  table.forum-topic-list tbody td:nth-child(n+3) {
    display: none;
  }

  .node--type-forum { padding: 0.75rem; }
  .node--type-forum h1.page-title { font-size: 1.25rem; }
  .indented .comment { margin-left: 0.75rem; }
  .comment { padding: 0.7rem; }
  .sc-forum-topic-stats { gap: 0.75rem; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  table.forum-table tbody td,
  table[id^="forum-topic-"] tbody td { padding: 0.4rem 0.5rem; font-size: 0.82rem; }
  .action-links a { width: 100%; justify-content: center; padding: 0.65rem; }
  .sc-forum-report-modal__content { padding: 1rem; }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

[data-theme="dark"] {
  --sc-forum-container-bg: #1e2a3a;
  --sc-forum-container-text: #60a5fa;
  --sc-forum-container-border: #3b82f6;
  --sc-forum-row-hover: #1a2332;
  --sc-forum-table-bg: #0f172a;
  --sc-forum-header-bg: #1e293b;
  --sc-forum-header-text: #94a3b8;
  --sc-forum-border: #334155;
  --sc-forum-title: #e2e8f0;
  --sc-forum-meta: #94a3b8;
  --sc-forum-body-text: #cbd5e1;
  --sc-forum-sticky-bg: #1c1a0f;
  --sc-forum-sticky-border: #d97706;
  --sc-forum-comment-bg: #1e293b;
  --sc-forum-comment-border: #334155;
  --sc-forum-nested-border: #3b82f6;
}
