/* Container-Struktur */
.sc-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Einzelne Beitrags-Karte */
.sc-post-card {
    display: flex;
    flex-direction: column; /* Mobil: Untereinander */
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

/* --- AUTOR-SEITENLEISTE (Mobil Default) --- */
.sc-post-author {
    background: var(--input-bg-2);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sc-author-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;                /* Abstand zwischen Name und Badge */
    flex-wrap: wrap;         /* Falls der Name sehr lang ist, bricht das Badge sauber um */
}

.sc-author-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: contain;          /* Proportional skalieren OHNE Beschneidung */
    background-color: var(--input-bg-2); /* Schließt Lücken bei nicht-quadratischen Bildern */
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

/* Das graue Standard-Ersatzbild */
.sc-avatar-default {
    width: 45px;
    height: 45px;
    background-color: var(--input-bg);
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 2.2rem;
    transition: transform 0.3s ease;
}

.avatar_link:hover .sc-author-avatar img, 
.avatar_link:hover .sc-avatar-default {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.sc-author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: -5px;
}

.sc-author-name {
	font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Badge-Anpassungen */
.sc-author-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    line-height: 1.2;
    display: inline-block;
}

.sc-author-badge.badge-admin {
    background-color: #8b0000;
    color: #ffcccc;
    border: 1px solid var(--border-color);
}

.sc-author-stats {
    font-size: 0.8rem;
    color: #888;
}

/* Supporter Badge Grafik Base */
.sc-author-supporter-badge {
    display: inline-block;
}

.sc-author-supporter-badge img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 4px;
}

/* --- MOBILE ANSICHT (unter 700px) --- */
@media (max-width: 699.98px) {
    .sc-author-supporter-badge {
        margin-left: auto; /* Schiebt das Badge rechtsbündig an den Rand */
        align-self: center; /* Zentriert es vertikal im Autor-Header */
    }

    .sc-author-supporter-badge img {
        max-height: 60px;  /* Begrenzt die Höhe für ein kompaktes mobiles Layout */
        width: auto;
    }
}

/* --- BEITRAGS-INHALT --- */
.sc-post-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sc-post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--light-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.sc-post-number {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.sc-post-body {
    color: var(--text-main);
    line-height: 1.3;
    font-size: 0.9rem;
    flex-grow: 1;
}

/* Signatur & Edit-Hinweis */
.sc-post-signature {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.sc-post-edited {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #777;
    text-align: right;
}

/* Aktions-Button */
.sc-post-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.fab-create-topic {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    text-decoration: none !important;
}
.fab-create-topic:hover, .fab-create-topic:hover i {
    text-decoration: none !important;
}

/* Wird getriggert, sobald das Seitenende erreicht ist */
.fab-create-topic.is-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.sc-end-of-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 0;
    color: var(--light-color);
    font-size: 0.82rem;
}

.sc-end-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color, rgba(255,255,255,0.1)), transparent);
    max-width: 150px;
}

.sc-end-text {
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.8;
}

.scroll-page-badge {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: rgba(20, 20, 20, 0.85);
    color: var(--light-color, #fff);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Lade-Indikator / Spinner */
.sc-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    gap: 10px;
}

.sc-loader-text {
    font-size: 0.82rem;
    color: var(--light-color);
    font-weight: 500;
}

.sc-loader-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.sc-loader-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: sc-loader-bounce 1.4s infinite ease-in-out both;
}

.sc-loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.sc-loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes sc-loader-bounce {
    0%, 80%, 100% { 
        transform: scale(0); 
    } 
    40% { 
        transform: scale(1.0); 
    }
}

.d-none {
    display: none !important;
}

mark.sc-search-highlight {
    background-color: rgba(255, 193, 7, 0.35); /* Dezentes Gelb/Orange */
    color: inherit;
    padding: 1px 4px;
    border-radius: 3px;
    border-bottom: 2px solid #ffc107;
}

/* Unsichtbare Beiträge für Admins transparenter darstellen */
.sc-post-card.is-invisible-post {
    opacity: 0.2f;
    border: 1px dashed var(--primary-color); 
    transition: opacity 0.2s ease;
}

/* Beim drüber Hovern leicht aufhellen für bessere Lesbarkeit */
.sc-post-card.is-invisible-post:hover {
    opacity: 0.85;
}

.me-2 {
	margin-left: 15px;
}

/* Statischer Umrandungseffekt für den Ziel-Beitrag */
.sc-post-card.highlight-post {
    border: 2px solid var(--secondary-color) !important;
    box-shadow: 0 0 12px rgba(var(--secondary-color-rgb, 255, 255, 255), 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}


#load-previous-posts-btn {
    margin-bottom: 10px;
}


/* Layout für Header-Icons */
.sc-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-post-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Direktlink Ausklapp-Box */
.sc-post-share-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 0 12px 0;
    animation: fadeIn 0.2s ease-in-out;
}

.share-box-content .share-label {
    font-size: 0.8rem;
    color: var(--light-color);
    display: block;
    margin-bottom: 5px;
}

.share-input-group {
    display: flex;
    gap: 6px;
}

.share-url-input {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-size: 0.85rem;
}

.toggle-share-btn {
	color: var(--light-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- DESKTOP LAYOUT (ab 700px) --- */
@media (min-width: 700px) {
    .sc-post-card {
        flex-direction: row; /* Nebeneinander */
    }

    .sc-post-author {
        width: 150px;
        min-width: 150px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 0;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
    }

    .sc-author-details {
        align-items: center;
    }
    
    .sc-author-header {
        justify-content: flex-start;
    }
    
    .sc-author-avatar img,
    .sc-avatar-default {
        width: 75px;
        height: 75px;
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .sc-author-supporter-badge {
        margin-top: 10px;
        margin-left: 0;
    }
}