/* --- TABLE BASE --- */
.table-forum {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
}

/* --- HEADER --- */
.table-forum thead th {
    background-color: var(--table-hover-color);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

/* Spaltenbreiten festlegen */
.table-forum th.col-name { width: 45%; text-align: left; }
.table-forum th.col-lastpost { width: 35%; text-align: left; }
.table-forum th.col-stats { width: 10%; text-align: center; }

/* --- ROWS & CELLS --- */
.table-forum tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table-forum tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-forum tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

/* --- CONTENT STYLING --- */
.sc-room-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sc-room-icon {
    color: var(--light-color); 
    font-size: 1.2rem;
    line-height: 1.2;
    min-width: 24px;
    text-align: center;
}

.topic-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
}

.topic-link:hover {
    text-decoration: underline;
}

.sc-topic-meta {
    color: var(--light-color);
    font-size: 0.85rem;
    margin-top: 2px;
}

.sc-last-post-info {
    font-size: 0.9rem;
}

.last-post-title {
    color: var(--text-main);
    text-decoration: none;
    display: inline-block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-post-title:hover {
    color: #e2a838;
}

.text-center { text-align: center; }
.fw-semibold { font-weight: 600; color: var(--text-main); }
.text-muted { color: var(--light-color); }

.table-forum td {
    vertical-align: top !important;
}

/* Responsive Anpassungen für Mobilgeräte */
@media (max-width: 700px) {

/* 1. Tabelle & Zellen-Restriktion */
    .table-forum {
        width: 100% !important;
        table-layout: fixed !important;
    }

    /* 2. Statistik-Spalten ausblenden */
    .table-forum th.col-stats,
    .table-forum td.col-stats {
        display: none !important;
    }

    /* 3. Platzverteilung Spalte 1 & 2 */
    .table-forum th.col-name,
    .table-forum td:nth-child(1) {
        width: 45%;
    }

    .table-forum th.col-lastpost,
    .table-forum td:nth-child(2) {
        width: 55%;
    }

    /* 4. Flexbox-Kaskade aufbrechen (WICHTIG für Umbrüche) */
    .sc-room-title-wrapper,
    .sc-last-post-info,
    .table-forum td {
        min-width: 0 !important; /* MUSS auf 0 gesetzt werden, damit Flexbox umbricht */
        overflow: hidden;
    }

    /* 5. Titel-Links zum Umbrechen zwingen */
    .table-forum td a,
    .table-forum .last-post-title {
        display: block !important;
        width: 100%;
        white-space: normal !important;      /* Verhindert "no-wrap" / Einzeiler */
        word-break: break-word !important;   /* Bricht überlange Wörter/Links */
        overflow-wrap: anywhere !important; /* Bricht auch Datums-Strings am Rand */
    }
}