/* ============================================================
   Forum - style współdzielone (prefiks .tf-).
   Krok 1: strona główna forum (kategorie + tematy).
   Klasy prefiksowane tf- aby nie kolidowały ze style.css.
   ============================================================ */

/* UWAGA: wrapper to .tf-forum, NIE .tf-page - .tf-page jest zajęte przez
   przyciski paginacji (poniżej). Mieszanie tych dwóch kurczyło stronę do 36px. */
/* width:100% bo #page-content to flex (justify-content:center) - bez tego .tf-forum
   kurczy się do treści (homepage dobijał do 1140 szeroką zawartością, kategoria do 853).
   Bez własnego tła i min-height - forum dziedziczy tło serwisu (#131111 + poświata
   body::before), żeby nie wyglądało jak osadzony panel/iframe. */
.tf-forum { width: 100%; padding: 0; font-family: 'Open Sans', sans-serif; color: #e8e8ec; }
/* Reset w obrębie forum (mockupy zakładały globalne * {margin:0;padding:0}).
   Zawężony do .tf-forum, by nie ruszać reszty serwisu (header/footer/bootstrap). */
.tf-forum *, .tf-forum *::before, .tf-forum *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tf-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* --- Hero --- */
.tf-hero { padding: 32px 0 28px; position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.tf-hero::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 200px; height: 1px; background: linear-gradient(90deg, transparent, rgba(180, 130, 220, 0.4), transparent); }
.tf-hero-text { flex: 1; min-width: 0; }
.tf-hero h1 { font-family: 'Raleway', sans-serif; font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: rgba(180, 130, 220, 0.7); margin-bottom: 12px; }
.tf-hero h2 { font-family: 'Raleway', sans-serif; font-size: 32px; font-weight: 300; color: #fff; letter-spacing: -0.5px; }
.tf-hero h2 span { color: #b482dc; font-weight: 500; }

.tf-search { display: flex; gap: 0; width: 100%; max-width: 420px; flex-shrink: 0; }
@media (max-width: 700px) { .tf-search { max-width: none; } }
.tf-search input { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.2); border-right: none; border-radius: 6px 0 0 6px; padding: 14px 20px; color: #e8e8ec; font-size: 14px; outline: none; transition: all 0.3s; }
.tf-search input:focus { background: rgba(255,255,255,0.05); border-color: rgba(180, 130, 220, 0.4); }
.tf-search input::placeholder { color: #5a5a6a; }
.tf-search button { background: rgba(180, 130, 220, 0.15); border: 1px solid rgba(180, 130, 220, 0.3); border-radius: 0 6px 6px 0; padding: 14px 24px; color: #b482dc; font-size: 14px; cursor: pointer; transition: all 0.3s; }
.tf-search button:hover { background: rgba(180, 130, 220, 0.25); }

/* --- Sekcje / etykiety --- */
.tf-section { margin: 40px 0; }
.tf-label { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(180, 130, 220, 0.6); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.tf-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(180, 130, 220, 0.2), transparent); }

/* --- Popularne teraz (poziomy scroll) --- */
.tf-hot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .tf-hot { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tf-hot { grid-template-columns: 1fr; } }
.tf-hot-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(180, 130, 220, 0.1); border-radius: 8px; padding: 16px 18px; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; }
.tf-hot-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #b482dc, #8e5ab8); opacity: 0; transition: opacity 0.3s; }
.tf-hot-item:hover { border-color: rgba(180, 130, 220, 0.3); background: rgba(255,255,255,0.04); }
.tf-hot-item:hover::before { opacity: 1; }
.tf-hot-tag { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #b482dc; margin-bottom: 8px; }
.tf-hot-title { font-size: 14px; font-weight: 400; color: #d8d8e8; line-height: 1.5; margin-bottom: 12px; }
.tf-hot-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #6a6a7a; }
.tf-hot-fire { color: #e07850; }

/* --- Układ dwukolumnowy: kategorie + sidebar --- */
.tf-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
@media (max-width: 900px) { .tf-grid { grid-template-columns: 1fr; } }

/* --- Kategorie --- */
.tf-categories { display: flex; flex-direction: column; gap: 16px; }
.tf-group { background: rgba(255,255,255,0.015); border: 1px solid rgba(180, 130, 220, 0.08); border-radius: 12px; overflow: hidden; }
.tf-group-header { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid rgba(180, 130, 220, 0.06); }
.tf-group-icon { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, rgba(180, 130, 220, 0.15) 0%, rgba(140, 90, 180, 0.08) 100%); border: 1px solid rgba(180, 130, 220, 0.12); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.tf-group-info { flex: 1; }
.tf-group-name { font-family: 'Raleway', sans-serif; font-size: 17px; font-weight: 600; color: #e8e8ec; margin-bottom: 3px; }
.tf-group-desc { font-size: 13px; color: #6a6a7a; }

.tf-subcats { display: flex; flex-direction: column; }
.tf-subcat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 14px 24px 14px 84px; border-bottom: 1px solid rgba(180, 130, 220, 0.04); cursor: pointer; transition: all 0.2s; text-decoration: none; }
@media (max-width: 600px) { .tf-subcat { padding-left: 24px; } }
.tf-subcat:last-child { border-bottom: none; }
.tf-subcat:hover { background: rgba(180, 130, 220, 0.03); }
.tf-subcat-name { font-size: 14px; color: #c8c8d8; transition: color 0.2s; }
.tf-subcat:hover .tf-subcat-name { color: #b482dc; }
.tf-subcat-stats { font-size: 12px; color: #5a5a6a; white-space: nowrap; }

/* --- Sidebar --- */
.tf-sidebar { display: flex; flex-direction: column; gap: 24px; }
.tf-sidebar-box { background: rgba(255,255,255,0.015); border: 1px solid rgba(180, 130, 220, 0.08); border-radius: 12px; padding: 20px; }
.tf-sidebar-title { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(180, 130, 220, 0.6); margin-bottom: 16px; }


.tf-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-tag { font-size: 12px; color: #8a8a9a; background: rgba(180, 130, 220, 0.06); padding: 6px 14px; border-radius: 20px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.tf-tag:hover { color: #b482dc; background: rgba(180, 130, 220, 0.12); border-color: rgba(180, 130, 220, 0.2); }


.tf-activity-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(180, 130, 220, 0.05); cursor: pointer; }
.tf-activity-item:last-child { border-bottom: none; }
.tf-activity-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #b482dc, #7050a0); flex-shrink: 0; }
.tf-activity-content { flex: 1; min-width: 0; }
.tf-activity-title { font-size: 13px; color: #c8c8d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.tf-activity-meta { font-size: 11px; color: #5a5a6a; }
.tf-activity-user { color: #9070b0; }

/* ============================================================
   Forum - krok 2: lista wątków w kategorii (forum/category.hbs)
   ============================================================ */

.tf-breadcrumb { padding: 20px 0; font-size: 13px; color: #5a5a6a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tf-breadcrumb a { color: #8a8a9a; text-decoration: none; transition: color 0.2s; }
.tf-breadcrumb a:hover { color: #b482dc; }
.tf-breadcrumb .sep { color: #3a3a4a; }
.tf-breadcrumb .current { color: #b482dc; }

.tf-cat-header { padding: 24px 0 32px; border-bottom: 1px solid rgba(180, 130, 220, 0.08); }
.tf-cat-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tf-cat-header-info { flex: 1; }
.tf-cat-header h1 { font-family: 'Raleway', sans-serif; font-size: 26px; font-weight: 500; color: #fff; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.tf-cat-header h1 .icon { font-size: 28px; }
.tf-cat-header p { font-size: 14px; color: #6a6a7a; max-width: 600px; }
.tf-btn-primary { background: linear-gradient(135deg, rgba(180, 130, 220, 0.9) 0%, rgba(140, 90, 180, 0.9) 100%); border: none; border-radius: 8px; padding: 12px 24px; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; }
.tf-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(180, 130, 220, 0.3); }

.tf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.tf-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tf-toolbar-right { display: flex; align-items: center; gap: 12px; }
.tf-filter-btn { background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 6px; padding: 8px 14px; color: #8a8a9a; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.tf-filter-btn:hover { border-color: rgba(180, 130, 220, 0.3); color: #b482dc; }
.tf-filter-btn.active { background: rgba(180, 130, 220, 0.1); border-color: rgba(180, 130, 220, 0.3); color: #b482dc; }
.tf-sort { background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 6px; padding: 8px 14px; color: #8a8a9a; font-size: 13px; cursor: pointer; outline: none; }
.tf-sort option { background: #16161d; }
.tf-stats-small { font-size: 13px; color: #5a5a6a; }

.tf-threads { display: flex; flex-direction: column; gap: 2px; background: rgba(180, 130, 220, 0.03); border-radius: 12px; overflow: hidden; }

.tf-thread { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 20px; background: rgba(12, 12, 18, 0.7); cursor: pointer; transition: all 0.2s; text-decoration: none; color: inherit; }
@media (max-width: 700px) {
    /* Wąski ekran: treść (tytuł/autor/tagi) pełna szerokość u góry, liczniki w jednej
       poziomej linii pod spodem — zamiast wyśrodkowanych pionowych bloków w 1-kolumnowym gridzie. */
    .tf-thread { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px; }
    .tf-thread-content { order: -1; flex: 1 1 100%; }
    .tf-thread-status { flex-direction: row; align-items: baseline; gap: 5px; width: auto; }
    .tf-thread-stats { justify-content: flex-start; gap: 16px; }
    .tf-thread-stat { flex-direction: row; align-items: baseline; gap: 5px; min-width: 0; text-align: left; }
}
.tf-thread:hover { background: rgba(20, 20, 30, 0.9); }
.tf-thread.pinned { background: rgba(180, 130, 220, 0.04); border-left: 3px solid rgba(180, 130, 220, 0.5); }
.tf-thread.closed { opacity: 0.7; }

.tf-thread-status { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 40px; }
.tf-thread-replies { font-size: 13px; font-weight: 500; color: #b482dc; }
.tf-thread-replies-label { font-size: 10px; color: #5a5a6a; text-transform: uppercase; }

.tf-thread-content { min-width: 0; }
.tf-thread-title { font-size: 15px; font-weight: 500; color: #e8e8ec; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tf-thread-title-text { transition: color 0.2s; }
.tf-thread:hover .tf-thread-title-text { color: #b482dc; }
.tf-thread-badge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.tf-thread-badge.pinned { background: rgba(180, 130, 220, 0.15); color: #b482dc; }
.tf-thread-badge.closed { background: rgba(120, 120, 140, 0.15); color: #8a8a9a; }
.tf-thread-badge.hot { background: rgba(224, 120, 80, 0.15); color: #e07850; }
.tf-thread-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tf-thread-author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8a8a9a; }
.tf-thread-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #b482dc, #7050a0); flex-shrink: 0; }
.tf-thread-author-name { color: #a8a8b8; }
.tf-thread-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-thread-tag { font-size: 11px; color: #7a7a8a; background: rgba(255,255,255,0.04); padding: 3px 10px; border-radius: 10px; }

.tf-thread-stats { display: flex; align-items: center; gap: 20px; }
@media (max-width: 700px) { .tf-thread-stats { gap: 16px; } }
.tf-thread-stat { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 50px; }
.tf-thread-stat-num { font-size: 14px; font-weight: 500; color: #c8c8d8; }
.tf-thread-stat-label { font-size: 10px; color: #5a5a6a; text-transform: uppercase; }
.tf-thread-last { display: flex; align-items: center; gap: 10px; min-width: 140px; }
@media (max-width: 900px) { .tf-thread-last { display: none; } }
.tf-thread-last-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #5090d0, #b482dc); flex-shrink: 0; }
.tf-thread-last-info { font-size: 12px; }
.tf-thread-last-user { color: #9070b0; }
.tf-thread-last-time { color: #5a5a6a; }

.tf-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 32px 0; }
.tf-page { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; color: #8a8a9a; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.08); cursor: pointer; transition: all 0.2s; text-decoration: none; }
.tf-page:hover { border-color: rgba(180, 130, 220, 0.3); color: #b482dc; }
.tf-page.active { background: rgba(180, 130, 220, 0.15); border-color: rgba(180, 130, 220, 0.4); color: #b482dc; }
.tf-page.dots { background: none; border: none; cursor: default; }
.tf-page.dots:hover { color: #8a8a9a; }

/* Pusta kategoria (placeholder / 404) */
.tf-empty { padding: 60px 20px; text-align: center; color: #6a6a7a; }
.tf-empty h2 { font-family: 'Raleway', sans-serif; font-weight: 400; color: #c8c8d8; margin-bottom: 8px; }

/* ============================================================
   Forum - krok 3: widok wątku (forum/thread.hbs)
   WSZYSTKO zescopowane pod .tf-thread-view, bo nazwy klas
   (.tf-thread-title/-author/-avatar/-tag/-meta) kolidują z listą
   wątków (krok 2) - bez scope popsułoby to stronę kategorii.
   Reużyte z wcześniejszych kroków (bez redefinicji): .tf-breadcrumb,
   .tf-btn-primary, .tf-pagination, .tf-page.
   ============================================================ */

.tf-thread-view .tf-thread-header { padding: 20px 0 28px; border-bottom: 1px solid rgba(180, 130, 220, 0.08); margin-bottom: 24px; }
.tf-thread-view .tf-thread-title { font-family: 'Raleway', sans-serif; font-size: 24px; font-weight: 500; color: #fff; line-height: 1.4; margin-bottom: 16px; }
.tf-thread-view .tf-thread-pinned { font-size: 20px; vertical-align: middle; }
.tf-thread-view .tf-thread-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tf-thread-view .tf-thread-subscribe { margin-top: 14px; display: flex; justify-content: flex-end; }
.tf-thread-view .tf-thread-author { display: flex; align-items: center; gap: 10px; }
.tf-thread-view .tf-thread-avatar { display: block; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #5090d0, #b482dc); }
.tf-thread-view .tf-thread-author-info { font-size: 13px; }
.tf-thread-view .tf-thread-author-name { color: #b482dc; font-weight: 500; }
.tf-thread-view .tf-thread-author-role { color: #6a6a7a; }
/* Klikalne profile autorów: link dziedziczy kolor kontekstu, podkreślenie/rozjaśnienie na hover.
   Awatar-link tylko z [href] dostaje afordancję (pusty <a> bez href = konto usunięte). */
.tf-thread-view a.tf-thread-author-name,
.tf-thread-view a.tf-comment-author,
.tf-thread-view .tf-post-username a { color: inherit; text-decoration: none; }
.tf-thread-view a.tf-thread-author-name:hover,
.tf-thread-view a.tf-comment-author:hover,
.tf-thread-view .tf-post-username a:hover { color: #b482dc; text-decoration: underline; }
.tf-thread-view a[href].tf-thread-avatar:hover,
.tf-thread-view a[href].tf-post-avatar:hover,
.tf-thread-view a[href].tf-comment-avatar:hover { opacity: 0.85; }
.tf-thread-view .tf-thread-date { font-size: 13px; color: #5a5a6a; }
.tf-thread-view .tf-thread-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 600px) { .tf-thread-view .tf-thread-tags { margin-left: 0; width: 100%; margin-top: 8px; } }
.tf-thread-view .tf-thread-tag { font-size: 11px; color: #8a8a9a; background: rgba(180, 130, 220, 0.08); padding: 5px 12px; border-radius: 12px; }
a.tf-thread-tag { text-decoration: none; cursor: pointer; }
a.tf-thread-tag:hover { color: #b482dc; }

/* Wyniki wyszukiwania forum */
.tf-search-page { margin: 16px 0; }
.tf-search-meta { color: #7a7a8a; font-size: 13px; margin: 12px 0; }
.tf-search-results { display: flex; flex-direction: column; gap: 10px; }
.tf-search-result { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,0.03); text-decoration: none; color: inherit; }
.tf-search-result:hover { background: rgba(180,130,220,0.08); }
.tf-search-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tf-search-title { font-weight: 600; color: #c8c8d8; }
.tf-search-reason { font-weight: 400; color: #7a7a8a; font-size: 12px; }
.tf-search-snippet { color: #9a9aab; font-size: 13px; margin: 3px 0; }
.tf-search-snippet mark { background: rgba(180,130,220,0.35); color: inherit; border-radius: 2px; padding: 0 1px; }
.tf-search-info { color: #6a6a7a; font-size: 12px; }

.tf-thread-view .tf-posts { display: flex; flex-direction: column; gap: 16px; }
/* overflow: visible (nie hidden) - inaczej obcina popover reakcji; rogi sidebara
   zaokrąglamy ręcznie, by jego tło nie wystawało poza zaokrągloną kartę. */
.tf-thread-view .tf-post { background: rgba(255,255,255,0.015); border: 1px solid rgba(180, 130, 220, 0.08); border-radius: 12px; overflow: visible; }
.tf-thread-view .tf-post.op { border-color: rgba(180, 130, 220, 0.15); }
.tf-thread-view .tf-post-main { display: grid; grid-template-columns: 140px 1fr; }
@media (max-width: 700px) { .tf-thread-view .tf-post-main { grid-template-columns: 1fr; } }
.tf-thread-view .tf-post-sidebar { background: rgba(180, 130, 220, 0.03); padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; border-right: 1px solid rgba(180, 130, 220, 0.06); border-radius: 12px 0 0 12px; }
@media (max-width: 700px) { .tf-thread-view .tf-post-sidebar { flex-direction: row; gap: 16px; text-align: left; border-right: none; border-bottom: 1px solid rgba(180, 130, 220, 0.06); border-radius: 12px 12px 0 0; } }
.tf-thread-view .tf-post-avatar { display: block; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 12px; position: relative; }
@media (max-width: 700px) { .tf-thread-view .tf-post-avatar { width: 48px; height: 48px; margin-bottom: 0; } }
.tf-thread-view .tf-post-avatar::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(180, 130, 220, 0.2); }
.tf-thread-view .tf-post-username { font-size: 14px; font-weight: 500; color: #e8e8ec; margin-bottom: 4px; }
.tf-thread-view .tf-post-role { font-size: 12px; color: #b482dc; margin-bottom: 10px; }
@media (max-width: 700px) { .tf-thread-view .tf-post-role { margin-bottom: 0; } }
.tf-thread-view .tf-post-karma { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6a6a7a; background: rgba(0,0,0,0.2); padding: 4px 10px; border-radius: 10px; }
.tf-thread-view .tf-post-karma-num { color: #b482dc; font-weight: 500; }
@media (max-width: 700px) { .tf-thread-view .tf-post-userinfo { flex: 1; } }
.tf-thread-view .tf-post-content { padding: 20px; display: flex; flex-direction: column; }
.tf-thread-view .tf-post-date { font-size: 12px; color: #5a5a6a; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.tf-thread-view .tf-post-date .num { color: #7a7a8a; }
.tf-thread-view .tf-post-body { font-size: 14px; line-height: 1.7; color: #c8c8d8; flex: 1; }
.tf-thread-view .tf-post-body p { margin-bottom: 12px; }
.tf-thread-view .tf-post-body p:last-child { margin-bottom: 0; }
.tf-thread-view .tf-post-body blockquote { background: rgba(180, 130, 220, 0.05); border-left: 3px solid rgba(180, 130, 220, 0.3); padding: 12px 16px; margin: 12px 0; font-style: italic; color: #a8a8b8; border-radius: 0 8px 8px 0; }
.tf-thread-view .tf-post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(180, 130, 220, 0.06); flex-wrap: wrap; gap: 12px; }
.tf-thread-view .tf-reactions { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-thread-view .tf-reaction { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.1); border-radius: 16px; padding: 5px 10px; font-size: 12px; color: #8a8a9a; cursor: pointer; transition: all 0.2s; }
.tf-thread-view .tf-reaction:hover { border-color: rgba(180, 130, 220, 0.3); background: rgba(180, 130, 220, 0.08); }
.tf-thread-view .tf-reaction.active { border-color: rgba(180, 130, 220, 0.4); background: rgba(180, 130, 220, 0.12); color: #b482dc; }
.tf-thread-view .tf-reaction-add { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.03); border: 1px dashed rgba(180, 130, 220, 0.15); border-radius: 50%; font-size: 14px; color: #6a6a7a; cursor: pointer; transition: all 0.2s; }
.tf-thread-view .tf-reaction-add:hover { border-color: rgba(180, 130, 220, 0.4); color: #b482dc; }
.tf-thread-view .tf-post-actions { display: flex; gap: 16px; }
.tf-thread-view .tf-post-action { font-size: 12px; color: #6a6a7a; cursor: pointer; transition: color 0.2s; display: flex; align-items: center; gap: 5px; }
.tf-thread-view .tf-post-action:hover { color: #b482dc; }

.tf-thread-view .tf-comments { background: rgba(0,0,0,0.15); border-top: 1px solid rgba(180, 130, 220, 0.06); padding: 16px 20px; }
.tf-thread-view .tf-comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(180, 130, 220, 0.04); }
.tf-thread-view .tf-comment:last-child { border-bottom: none; }
.tf-thread-view .tf-comment-avatar { display: block; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.tf-thread-view .tf-comment-content { flex: 1; }
.tf-thread-view .tf-comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tf-thread-view .tf-comment-author { font-size: 13px; font-weight: 500; color: #b482dc; }
.tf-thread-view .tf-comment-time { font-size: 11px; color: #5a5a6a; }
.tf-thread-view .tf-comment-body { font-size: 13px; color: #a8a8b8; line-height: 1.5; }
.tf-thread-view .tf-comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tf-thread-view .tf-comment-action { font-size: 11px; color: #5a5a6a; cursor: pointer; transition: color 0.2s; background: none; border: none; padding: 0; font-family: inherit; }
.tf-thread-view .tf-comment-action:hover { color: #b482dc; }
.tf-thread-view .tf-comment-edit summary { list-style: none; }
.tf-thread-view .tf-comment-edit summary::-webkit-details-marker { display: none; }
.tf-thread-view .tf-comment-edit[open] { flex: 1 1 100%; }
.tf-thread-view .tf-comment-edit-form { display: flex; gap: 8px; margin-top: 8px; }
.tf-thread-view .tf-comment-edit-form input { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.1); border-radius: 20px; padding: 8px 16px; color: #e8e8ec; font-size: 13px; outline: none; }
.tf-thread-view .tf-comment-edit-form input:focus { border-color: rgba(180, 130, 220, 0.3); }
.tf-thread-view .tf-comment-delete-form { display: contents; }
.tf-thread-view .tf-add-comment { display: flex; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(180, 130, 220, 0.06); }
.tf-thread-view .tf-add-comment input { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.1); border-radius: 20px; padding: 8px 16px; color: #e8e8ec; font-size: 13px; outline: none; }
.tf-thread-view .tf-add-comment input:focus { border-color: rgba(180, 130, 220, 0.3); }
.tf-thread-view .tf-add-comment input::placeholder { color: #5a5a6a; }

.tf-thread-view .tf-reply-box { background: rgba(255,255,255,0.015); border: 1px solid rgba(180, 130, 220, 0.08); border-radius: 12px; padding: 20px; margin-top: 24px; }
.tf-thread-view .tf-reply-label { font-size: 14px; font-weight: 500; color: #b482dc; margin-bottom: 16px; }

/* Zachęta do logowania (zamiast pola odpowiedzi dla niezalogowanych) */
.tf-thread-view .tf-reply-login { margin-top: 24px; padding: 16px 20px; border-radius: 12px; background: rgba(255,255,255,0.015); border: 1px solid rgba(180, 130, 220, 0.08); color: #9a9aae; font-size: 14px; }
.tf-thread-view .tf-reply-login a { color: #b482dc; }

/* Notka o zamkniętym wątku (zamiast pola odpowiedzi) */
.tf-thread-view .tf-closed-note { margin-top: 24px; padding: 16px 20px; border-radius: 12px; background: rgba(120, 120, 140, 0.08); border: 1px solid rgba(120, 120, 140, 0.18); color: #9a9aae; font-size: 14px; display: flex; align-items: center; gap: 10px; }

/* ============================================================
   Forum - formularz (Krok A: nowy wątek; reużywalny dla odpowiedzi)
   ============================================================ */
.tf-form { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.tf-form-label { font-size: 13px; color: #b482dc; font-weight: 500; margin-top: 14px; }
.tf-form-hint { color: #5a5a6a; font-weight: 400; }
.tf-form-input, .tf-form-textarea { background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; padding: 12px 14px; color: #e8e8ec; font-size: 14px; outline: none; font-family: inherit; }
.tf-form-input:focus, .tf-form-textarea:focus { border-color: rgba(180, 130, 220, 0.35); }
.tf-form-input::placeholder, .tf-form-textarea::placeholder { color: #5a5a6a; }
.tf-form-textarea { min-height: 220px; line-height: 1.6; resize: vertical; }
.tf-form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.tf-form-error { margin: 16px 0; padding: 12px 16px; border-radius: 8px; background: rgba(224, 80, 80, 0.1); border: 1px solid rgba(224, 80, 80, 0.25); color: #e09090; font-size: 14px; }
/* Przycisk secondary. .tf-thread-action = kompaktowy wariant (akcje wątku: obserwuj/zamknij/pin),
   dzieli wspólną bazę wizualną; różni się tylko rozmiarem + obsługą <summary> (details) i emoji-gap. */
.tf-btn-secondary,
.tf-thread-view .tf-thread-action { background: rgba(255,255,255,0.04); border: 1px solid rgba(180, 130, 220, 0.15); border-radius: 8px; color: #c8c8d8; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: all 0.2s; }
.tf-btn-secondary:hover,
.tf-thread-view .tf-thread-action:hover { border-color: rgba(180, 130, 220, 0.35); color: #fff; }
.tf-btn-secondary { padding: 12px 24px; font-size: 14px; }
.tf-thread-view .tf-thread-action { padding: 8px 14px; font-size: 13px; line-height: 1; gap: 6px; white-space: nowrap; list-style: none; }
.tf-thread-view .tf-thread-action::-webkit-details-marker { display: none; }

/* ============================================================
   Forum - reakcje emoji na postach (widget forum-reactions.js)
   .tf-reaction / .tf-reaction-add już zdefiniowane (krok 3 widoku wątku);
   tu: poprawki dla <button>, emoji-img i picker.
   ============================================================ */
.tf-thread-view .tf-reactions { position: relative; }
.tf-thread-view .tf-reaction, .tf-thread-view .tf-reaction-add { font-family: inherit; }
.tf-thread-view .tf-reaction[disabled] { cursor: default; }
.tf-thread-view .tf-reaction-emoji { display: inline-block; vertical-align: -3px; }

.tf-thread-view .tf-reaction-picker { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 4px; width: 264px; max-width: 80vw; padding: 8px; background: #16161d; border: 1px solid rgba(180, 130, 220, 0.25); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.45); }
.tf-thread-view .tf-reaction-picker[hidden] { display: none; }
.tf-thread-view .tf-picker-emoji { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.tf-thread-view .tf-picker-emoji:hover { background: rgba(180, 130, 220, 0.12); border-color: rgba(180, 130, 220, 0.3); }
.tf-thread-view .tf-picker-more { width: 100%; margin-top: 4px; padding: 6px; background: transparent; border: none; border-top: 1px solid rgba(180, 130, 220, 0.1); color: #b482dc; font-size: 12px; cursor: pointer; font-family: inherit; }
.tf-thread-view .tf-picker-more:hover { color: #fff; }

/* Akcje posta jako <button>/<form> (Edytuj/Usuń) - spójne z .tf-post-action (div).
   Tylko font-family inherit (NIE `font: inherit` - to resetowało font-size:12px i robiło
   przyciski większe od linków). */
.tf-thread-view .tf-post-action-form { display: inline-flex; margin: 0; }
.tf-thread-view button.tf-post-action { background: none; border: none; padding: 0; font-family: inherit; }
.tf-thread-view .tf-post-action-danger:hover { color: #e09090; }

/* Wspólny edytor treści (partial forum-editor) - tworzenie/odpowiedź/edycja */
.tf-editor { display: flex; flex-direction: column; }
.tf-editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.tf-editor-tabs { display: flex; gap: 4px; }
.tf-editor-tabs[hidden] { display: none; }
.tf-editor-tab { padding: 6px 14px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #8a8a9a; font-family: inherit; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.tf-editor-tab:hover { color: #b482dc; }
.tf-editor-tab.active { background: rgba(180, 130, 220, 0.1); border-color: rgba(180, 130, 220, 0.25); color: #b482dc; }
.tf-editor-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-editor-tools[hidden] { display: none; }
.tf-editor-sep { width: 1px; height: 20px; align-self: center; background: rgba(180, 130, 220, 0.15); }
.tf-editor-tool { min-width: 34px; height: 32px; padding: 0 6px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 6px; color: #8a8a9a; font-family: inherit; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.tf-editor-tool:hover { border-color: rgba(180, 130, 220, 0.3); color: #b482dc; }
.tf-editor-textarea { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; padding: 12px 14px; color: #e8e8ec; font-size: 14px; line-height: 1.6; resize: vertical; min-height: 160px; outline: none; font-family: inherit; }
.tf-editor-textarea:focus { border-color: rgba(180, 130, 220, 0.35); }
.tf-editor-textarea::placeholder { color: #5a5a6a; }
.tf-editor-textarea[hidden] { display: none; }
.tf-editor-preview { width: 100%; min-height: 160px; background: rgba(255,255,255,0.02); border: 1px dashed rgba(180, 130, 220, 0.2); border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.7; color: #c8c8d8; }
.tf-editor-preview[hidden] { display: none; }
.tf-editor-preview-note { color: #5a5a6a; font-style: italic; }
.tf-editor-hint { margin-top: 6px; font-size: 11px; color: #5a5a6a; }
.tf-editor-hint code { background: rgba(255,255,255,0.05); border-radius: 3px; padding: 1px 4px; font-size: 11px; }

/* Treść markdown (posty w wątku + podgląd edytora) - wyjście ForumMarkdown */
.tf-md h1, .tf-md h2, .tf-md h3 { font-family: 'Raleway', sans-serif; color: #e8e8ec; font-weight: 500; margin: 18px 0 8px; line-height: 1.3; }
.tf-md h1:first-child, .tf-md h2:first-child, .tf-md h3:first-child { margin-top: 0; }
.tf-md h1 { font-size: 21px; }
.tf-md h2 { font-size: 18px; }
.tf-md h3 { font-size: 15px; }
.tf-md p { margin-bottom: 12px; }
.tf-md p:last-child { margin-bottom: 0; }
.tf-md ul, .tf-md ol { margin: 0 0 12px; padding-left: 24px; }
.tf-md li { margin-bottom: 4px; }
.tf-md blockquote { background: rgba(180, 130, 220, 0.05); border-left: 3px solid rgba(180, 130, 220, 0.3); padding: 12px 16px; margin: 12px 0; font-style: italic; color: #a8a8b8; border-radius: 0 8px 8px 0; }
.tf-md blockquote p:last-child { margin-bottom: 0; }
.tf-md code { background: rgba(255,255,255,0.06); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 4px; padding: 1px 5px; font-family: 'Courier New', monospace; font-size: 13px; color: #d8b8ec; }
.tf-md pre { background: rgba(0,0,0,0.35); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; padding: 12px 14px; margin: 12px 0; overflow-x: auto; }
.tf-md pre code { background: none; border: none; padding: 0; color: #c8c8d8; }
.tf-md hr { border: none; height: 1px; background: linear-gradient(90deg, rgba(180, 130, 220, 0.25), transparent); margin: 16px 0; }
.tf-md a { color: #b482dc; text-decoration: none; }
.tf-md a:hover { text-decoration: underline; }
.tf-md s, .tf-md del { color: #8a8a9a; }
.tf-md img.tf-md-emoji { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; }

/* ============================================================
   Edytor - ikony toolbara, ściąga składni (details), akcje wątku
   ============================================================ */
.tf-editor-tool .fa-solid { font-size: 13px; }

/* Ściąga markdown: summary = dotychczasowy hint + „zobacz wszystkie" */
.tf-editor-help { margin-top: 6px; }
.tf-editor-help summary { cursor: pointer; list-style: none; }
.tf-editor-help summary::-webkit-details-marker { display: none; }
.tf-editor-help-more { color: #b482dc; white-space: nowrap; }
.tf-editor-help summary:hover .tf-editor-help-more { text-decoration: underline; }
.tf-editor-help[open] .tf-editor-help-more { display: none; }
.tf-editor-help-body { margin-top: 8px; padding: 12px 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; }
.tf-editor-help-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 12px; color: #8a8a9a; align-items: baseline; }
.tf-editor-help-grid code { background: rgba(255,255,255,0.05); border-radius: 3px; padding: 1px 5px; font-size: 11px; color: #d8b8ec; white-space: nowrap; justify-self: start; }

/* Ukrywanie pola komentarza / linku „Dodaj komentarz" (forum-thread.js).
   .tf-post-action ma display:flex, które wygrywa z UA [hidden] - stąd jawne reguły. */
.tf-thread-view .tf-post-action[hidden] { display: none; }
.tf-thread-view .tf-comments[hidden] { display: none; }
/* Po odsłonięciu formularz bywa jedynym dzieckiem sekcji - bez górnej kreski/odstępu */
.tf-thread-view .tf-add-comment:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* Zamknięty wątek: notka z opcjonalnym powodem (dwie linie) */
.tf-thread-view .tf-closed-note { flex-direction: column; align-items: flex-start; gap: 6px; }
.tf-thread-view .tf-closed-reason { font-size: 13px; color: #8a8a9a; }

/* Pasek akcji moderacyjnych pod wątkiem — toolbar (przyciski = .tf-thread-action, styl w sekcji przycisków) */
.tf-thread-view .tf-thread-admin { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.tf-thread-view .tf-thread-admin form { margin: 0; }

/* „Zamknij wątek": po rozwinięciu <details> formularz z przyczyną zajmuje pełną szerokość paska */
.tf-thread-view .tf-thread-admin details[open] { flex-basis: 100%; }
.tf-thread-view .tf-thread-admin details[open] > summary { margin-bottom: 10px; }
.tf-thread-view .tf-thread-admin-form { display: flex; gap: 10px; flex-wrap: wrap; }
.tf-thread-view .tf-thread-admin-form input { flex: 1; min-width: 220px; background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; padding: 8px 14px; color: #e8e8ec; font-size: 13px; outline: none; }
.tf-thread-view .tf-thread-admin-form input:focus { border-color: rgba(180, 130, 220, 0.3); }
.tf-thread-view .tf-thread-admin-form input::placeholder { color: #5a5a6a; }

/* Pigułki tagów (wspólny tag-pills.js) - dopasowanie do stylu pól forum;
   bazowe .tags-input/.tag przychodzą z globalnego style.css */
.tf-forum .tags-input { background: rgba(255,255,255,0.03); border: 1px solid rgba(180, 130, 220, 0.12); border-radius: 8px; padding: 8px 10px; }
.tf-forum .tags-input:focus-within { border-color: rgba(180, 130, 220, 0.35); }
.tf-forum .tags-input > input { color: #e8e8ec; font-family: inherit; }
.tf-forum .tags-input > input::placeholder { color: #5a5a6a; }

/* Podpowiedzi wzmianek @login w edytorze (forum-editor.js) */
.tf-editor { position: relative; }
.tf-editor-ac { position: absolute; left: 0; width: min(360px, 100%); z-index: 40; background: #1c1626; border: 1px solid rgba(180, 130, 220, 0.25); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); max-height: 264px; overflow-y: auto; padding: 4px; }
.tf-editor-ac[hidden] { display: none; }
.tf-editor-ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.tf-editor-ac-item.sel, .tf-editor-ac-item:hover { background: rgba(180, 130, 220, 0.12); }
.tf-editor-ac-av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, #6a4a8a, #b482dc); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tf-editor-ac-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-editor-ac-login { font-size: 13px; font-weight: 600; color: #e8e8ec; }
.tf-editor-ac-role { font-size: 11px; color: #8a8a9a; margin-left: auto; }

/* Wzmianka @login w treści posta */
.tf-md a.tf-md-mention { background: rgba(180, 130, 220, 0.12); border-radius: 5px; padding: 0 4px; font-weight: 500; }
.tf-md a.tf-md-mention:hover { background: rgba(180, 130, 220, 0.22); text-decoration: none; }

/* Plakietka !user/login - kompaktowa karta profilu inline (avatar + nick + rola z ikoną) */
.tf-md a.tf-md-user-card {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    min-width: 165px;
    border-radius: 12px;
    background: #241d33;
    border: 1px solid #372c52;
    box-shadow: 0 4px 14px rgba(83, 74, 183, 0.18);
    text-decoration: none;
    vertical-align: middle;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tf-md a.tf-md-user-card:hover {
    border-color: #534ab7;
    box-shadow: 0 4px 18px rgba(83, 74, 183, 0.28);
    text-decoration: none;
}
.tf-md a.tf-md-user-card:focus-visible {
    outline: 2px solid #b482dc;
    outline-offset: 2px;
}

/* Avatar: 40px okrągły, img lub fallback (pierwsza litera na gradiencie) */
.tf-md .tf-md-user-card-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tf-md .tf-md-user-card-avatar .tf-md-user-card-av {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tf-md .tf-md-user-card-av-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7f77dd, #534ab7);
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tekst: dwie linie (nick + rola) */
.tf-md .tf-md-user-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}
.tf-md .tf-md-user-card-name {
    font-weight: 500;
    font-size: 15px;
    color: #efedf9;
}
.tf-md .tf-md-user-card-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #a99fd6;
}
.tf-md .tf-md-user-card-role i {
    font-size: 13px;
}

/* ============================================================
   Szybkie mechaniki (2026-07-02): linki w hero/sidebarze,
   tooltip „kto zareagował", formularz sortowania
   ============================================================ */
/* Elementy „Popularne teraz"/„Ostatnia aktywność"/tagi są teraz linkami */
a.tf-hot-item, a.tf-activity-item, a.tf-tag { display: block; color: inherit; text-decoration: none; }
a.tf-activity-item { display: flex; }
a.tf-tag { display: inline-block; }
.tf-sidebar-hint { font-size: 11px; color: #5a5a6a; font-weight: 400; }
.tf-sort-form { display: inline-flex; }

/* Reakcje bez uprawnień: zwykły kursor (bez [disabled], żeby hover działał) */
.tf-thread-view .tf-reaction.readonly { cursor: default; }
.tf-thread-view .tf-reaction.readonly:hover { border-color: rgba(180, 130, 220, 0.1); background: rgba(255,255,255,0.03); }

/* Tooltip „kto zareagował" nad chipem reakcji */
.tf-thread-view .tf-reaction { position: relative; }
.tf-thread-view .tf-reaction-who { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 25; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; background: #16161d; border: 1px solid rgba(180, 130, 220, 0.25); border-radius: 8px; padding: 6px 10px; font-size: 11px; color: #c8c8d8; box-shadow: 0 6px 20px rgba(0,0,0,0.4); pointer-events: none; }
.tf-thread-view .tf-reaction-who[hidden] { display: none; }

/* Załączniki obrazkowe w treści posta — miniatura inline, klik = lightbox */
.tf-md .tf-md-attachment { margin: 0.75rem 0; }
.tf-md .tf-md-attachment-zoom { display: inline-block; max-width: min(100%, 400px); cursor: zoom-in; }
.tf-md .tf-md-attachment-img { max-width: 100%; height: auto; border-radius: 6px; display: block; }
.tf-md .tf-md-attachment figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; opacity: 0.7; margin-top: 0.25rem; }
.tf-md .tf-md-attachment-desc { font-style: italic; opacity: 0.9; }
.tf-md .tf-md-attachment.pending {
    padding: 1rem; border: 1px dashed rgba(128,128,128,0.5); border-radius: 6px;
    font-size: 0.85rem; opacity: 0.75;
}
.tf-md .tf-md-attachment.failed { font-size: 0.85rem; opacity: 0.7; }

/* Lightbox pełnego obrazu */
.tf-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); cursor: zoom-out; }
.tf-lightbox[hidden] { display: none; }
.tf-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

/* Karta wątku !forum/:id - kompaktowa karta inline (ikona + tytuł + meta) */
.tf-md a.tf-md-thread-card {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    min-width: 200px;
    border-radius: 12px;
    background: #241d33;
    border: 1px solid #372c52;
    box-shadow: 0 4px 14px rgba(83, 74, 183, 0.18);
    text-decoration: none;
    vertical-align: middle;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tf-md a.tf-md-thread-card:hover {
    border-color: #534ab7;
    box-shadow: 0 4px 18px rgba(83, 74, 183, 0.28);
    text-decoration: none;
}
.tf-md a.tf-md-thread-card:focus-visible {
    outline: 2px solid #b482dc;
    outline-offset: 2px;
}

/* Ikona wątku: zaokrąglony kwadrat (border-radius: 10px, nie koło - rozróżnienie od avatara) */
.tf-md .tf-md-thread-card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #7f77dd, #534ab7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tf-md .tf-md-thread-card-icon i { font-size: 20px; }

/* Tekst: dwie linie (tytuł + meta) */
.tf-md .tf-md-thread-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

/* Tytuł wątku */
.tf-md .tf-md-thread-card-title {
    font-weight: 500;
    font-size: 15px;
    color: #efedf9;
    line-height: 1.2;
}

/* Meta-linia: kategoria + kropka + odpowiedzi */
.tf-md .tf-md-thread-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a99fd6;
    line-height: 1.2;
}
.tf-md .tf-md-thread-card-cat,
.tf-md .tf-md-thread-card-replies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tf-md .tf-md-thread-card-cat i,
.tf-md .tf-md-thread-card-replies i { font-size: 13px; }
.tf-md .tf-md-thread-card-dot { color: #5c5175; }

/* Visually hidden but available to screen readers and AT.
   Used to provide a page <h1> where the visible heading lives in a breadcrumb/badge. */
.tf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
