/* ============================================================
   GTI7 Community Portal – Forum CSS
   ============================================================ */

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex; align-items: center; gap: 6px; font-size: 13px;
    color: var(--c-text2); margin-bottom: 1.25rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-accent); }
.breadcrumb a:hover { color: #79b8ff; }
.breadcrumb i { color: var(--c-text3); font-size: 10px; }

/* ---- Forum Index: Kategorie-Karten ---- */
.forum-cat-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); margin-bottom: .625rem;
    transition: border-color var(--transition), background var(--transition);
    color: var(--c-text);
}
.forum-cat-card:hover { border-color: var(--c-border2); background: var(--c-bg2); }
.forum-cat-card__icon {
    width: 46px; height: 46px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.forum-cat-card__info { flex: 1; min-width: 0; }
.forum-cat-card__name { font-family: var(--font-head); font-size: 17px; font-weight: 600; margin-bottom: .2rem; }
.forum-cat-card__desc { font-size: 13px; color: var(--c-text2); margin-bottom: .35rem; }
.forum-cat-card__stats { display: flex; gap: 1rem; font-size: 12px; color: var(--c-text3); }
.forum-cat-card__stats i { margin-right: 3px; }
.forum-cat-card__last { min-width: 180px; text-align: right; display: none; }
.forum-cat-card__last-title { font-size: 13px; color: var(--c-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.forum-cat-card__last-meta { font-size: 11px; color: var(--c-text3); }

/* ---- Thread-Liste ---- */
.thread-list { border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; }
.thread-row {
    display: flex; align-items: center; gap: .875rem; padding: .875rem 1.1rem;
    border-bottom: 1px solid var(--c-border); transition: background var(--transition);
    color: var(--c-text);
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: var(--c-bg2); }
.thread-row--unread { border-left: 3px solid var(--c-accent); }
.thread-row__icon { width: 24px; text-align: center; flex-shrink: 0; font-size: 16px; }
.thread-row__main { flex: 1; min-width: 0; }
.thread-row__title { font-size: 15px; font-weight: 500; margin-bottom: .3rem; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.thread-row__meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--c-text2); }
.thread-row__avatar {
    width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--c-accent); display: flex; align-items: center;
    justify-content: center; font-size: 10px; font-weight: 700; color: #fff;
}
.thread-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-row__stats { display: flex; gap: 1.25rem; flex-shrink: 0; }
.thread-row__stats div { text-align: center; }
.thread-row__stats strong { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--c-text); }
.thread-row__stats span { font-size: 11px; color: var(--c-text3); }
.thread-row__last { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 130px; }
.thread-row__last-avatar {
    width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
    background: var(--c-accent2); display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.thread-row__last-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-new-badge {
    font-size: 10px; background: rgba(74,158,255,.15); color: var(--c-accent);
    border-radius: 10px; padding: 1px 7px; font-weight: 600;
}
.thread-badge { font-size: 10px; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.thread-badge--locked { background: rgba(230,126,34,.15); color: var(--c-orange); }
.thread-badge--pinned { background: rgba(46,204,113,.15); color: var(--c-green); }

/* ---- Thread-Header ---- */
.thread-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.thread-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---- Posts ---- */
.post {
    display: flex; gap: 0;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); margin-bottom: .875rem; overflow: hidden;
}
.post__sidebar {
    width: 140px; flex-shrink: 0; padding: 1.25rem 1rem;
    background: var(--c-bg2); border-right: 1px solid var(--c-border);
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.post__avatar {
    width: 70px; height: 70px; border-radius: 50%; overflow: hidden; display: block;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent2));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 26px; font-weight: 700; color: #fff;
    margin-bottom: .35rem;
}
.post__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post__username { font-size: 14px; font-weight: 600; color: var(--c-text); }
.post__rank { font-size: 11px; font-weight: 600; }
.post__postcount { font-size: 11px; color: var(--c-text3); }
.post__body { flex: 1; padding: 1rem 1.25rem; min-width: 0; }
.post__meta { display: flex; align-items: center; gap: .75rem; font-size: 12px; color: var(--c-text2); margin-bottom: .875rem; padding-bottom: .875rem; border-bottom: 1px solid var(--c-border); }
.post__num { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--c-text3); }
.post__content { font-size: 15px; line-height: 1.75; color: var(--c-text); min-height: 40px; }
.post__actions { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--c-border); flex-wrap: wrap; }

/* ---- Like-Button ---- */
.like-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: .35rem .75rem;
    background: var(--c-bg3); border: 1px solid var(--c-border);
    border-radius: 20px; color: var(--c-text2); font-size: 13px; cursor: pointer;
    transition: all var(--transition);
}
.like-btn:hover { border-color: var(--c-red); color: var(--c-red); }
.like-btn--active { background: rgba(231,76,60,.1); border-color: rgba(231,76,60,.4); color: var(--c-red); }
.like-count-static { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--c-text2); }

/* ---- Antwort-Formular ---- */
.reply-form {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 1.5rem;
}
.reply-form__title {
    font-family: var(--font-head); font-size: 18px; font-weight: 600;
    margin-bottom: 1rem; display: flex; align-items: center; gap: 8px;
}
.reply-form__title i { color: var(--c-accent); }

/* ---- BBCode-Editor ---- */
.bb-toolbar {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    background: var(--c-bg2); border: 1px solid var(--c-border2);
    border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
    padding: .35rem .5rem;
}
.bb-toolbar__btn {
    background: none; border: none; color: var(--c-text2); padding: .3rem .45rem;
    border-radius: 4px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.bb-toolbar__btn:hover { background: var(--c-surface); color: var(--c-text); }
.bb-toolbar__sep { width: 1px; height: 16px; background: var(--c-border2); margin: 0 3px; }
.bb-editor-ta {
    border-radius: 0 0 var(--radius) var(--radius) !important;
    font-family: var(--font-mono, monospace); font-size: 14px; resize: vertical;
}

/* ---- BBCode Rendering ---- */
.bb-content .bb-code {
    background: var(--c-bg2); border: 1px solid var(--c-border);
    border-radius: 4px; padding: 1px 6px; font-size: 13px; font-family: monospace;
}
.bb-content .bb-pre {
    background: var(--c-bg2); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: 1rem; overflow-x: auto;
    font-size: 13px; font-family: monospace; margin: .75rem 0;
}
.bb-content .bb-quote {
    border-left: 3px solid var(--c-accent); padding: .5rem .75rem .5rem 1rem;
    background: rgba(74,158,255,.06); border-radius: 0 var(--radius) var(--radius) 0;
    margin: .75rem 0; color: var(--c-text2);
}
.bb-content .bb-quote cite {
    display: block; font-size: 12px; color: var(--c-accent);
    font-style: normal; font-weight: 600; margin-bottom: .3rem;
}
.bb-content .bb-spoiler {
    background: var(--c-bg2); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: .5rem .875rem; margin: .75rem 0;
}
.bb-content .bb-spoiler summary { cursor: pointer; font-size: 13px; color: var(--c-text2); }
.bb-content .bb-link { color: var(--c-accent); text-decoration: underline; }
.bb-content .bb-img { max-width: 100%; border-radius: var(--radius); margin: .5rem 0; max-height: 400px; object-fit: contain; }
.bb-content .bb-h { font-family: var(--font-head); font-size: 19px; font-weight: 700; margin: .75rem 0 .3rem; }
.bb-content .bb-list { padding-left: 1.5rem; margin: .5rem 0; }
.bb-content .bb-list li { margin-bottom: .2rem; }

/* ---- Forum-Leer-State ---- */
.forum-empty {
    text-align: center; padding: 3rem 1rem;
    color: var(--c-text2);
}
.forum-empty i { font-size: 40px; color: var(--c-border2); margin-bottom: 1rem; display: block; }
.forum-empty p { margin-bottom: 1rem; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .thread-row__last  { display: none; }
    .thread-row__stats { display: none; }
    .forum-cat-card__last { display: none; }
    .post__sidebar { width: 100px; }
}
@media (max-width: 600px) {
    .post { flex-direction: column; }
    .post__sidebar { width: 100%; flex-direction: row; border-right: none; border-bottom: 1px solid var(--c-border); padding: .75rem 1rem; text-align: left; }
    .post__avatar { width: 42px; height: 42px; font-size: 18px; margin-bottom: 0; }
    .post__postcount { display: none; }
}
