/* =========================================================
   Forum
   Public Forum CSS
   ========================================================= */

/* ---------------------------------------------------------
   Allgemeiner Forum-Bereich
   --------------------------------------------------------- */

.forum-page,
.forum-wrap {
    max-width: 1100px;
    margin: 25px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   Breadcrumb
   --------------------------------------------------------- */

.forum-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: .95rem;
    opacity: .85;
}

.forum-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    text-decoration: underline;
}

.forum-breadcrumb strong {
    font-weight: 600;
}

/* ---------------------------------------------------------
   Karten
   --------------------------------------------------------- */

.forum-card {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(127, 127, 127, .08);
    border: 1px solid rgba(127, 127, 127, .18);
    box-sizing: border-box;
}

.forum-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.forum-card-head h1,
.forum-card-head h2 {
    margin: 0 0 6px;
}

.forum-card-head p {
    margin: 0;
    opacity: .7;
}

/* ---------------------------------------------------------
   Forum �berschriften
   --------------------------------------------------------- */

.forum-head,
.forum-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.forum-head h1,
.forum-topic-header h1 {
    margin: 0 0 6px;
}

.forum-head p,
.forum-topic-header p {
    margin: 0;
    opacity: .75;
}

/* ---------------------------------------------------------
   Kategorien / Themenlisten
   --------------------------------------------------------- */

.forum-categories,
.forum-topic-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-category,
.forum-topic-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: rgba(127, 127, 127, .08);
    border: 1px solid rgba(127, 127, 127, .18);
    box-sizing: border-box;
}

.forum-category:hover,
.forum-topic-row:hover {
    background: rgba(127, 127, 127, .14);
}

.forum-category-main,
.forum-topic-main {
    flex: 1;
}

.forum-category h2 {
    margin: 0 0 5px;
    font-size: 1.15rem;
}

.forum-category p {
    margin: 0;
    opacity: .75;
}

.forum-category-stats,
.forum-topic-stats {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 3px;
    font-size: .85rem;
    opacity: .7;
}

.forum-topic-icon {
    font-size: 1.35rem;
}

.forum-topic-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.forum-topic-main span {
    font-size: .85rem;
    opacity: .7;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.forum-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    padding: 10px 15px;
    background: #444;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
}

.forum-button:hover {
    opacity: .88;
}

.forum-button-secondary {
    background: #777;
}

.forum-button.secondary {
    background: #777;
}

/* ---------------------------------------------------------
   Formulare
   --------------------------------------------------------- */

.forum-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.forum-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 600;
}

.forum-form input,
.forum-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid #bbb;
    background: transparent;
    color: inherit;
    font: inherit;
}

.forum-form input:focus,
.forum-form textarea:focus {
    outline: none;
    border-color: #777;
}

.forum-form textarea {
    resize: vertical;
    min-height: 120px;
}

.forum-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------------------------------------------------------
   Beitr�ge
   --------------------------------------------------------- */

.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-post {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(127, 127, 127, .08);
    border: 1px solid rgba(127, 127, 127, .18);
    box-sizing: border-box;
}

.forum-post-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(127, 127, 127, .18);
}

.forum-post-head strong {
    font-weight: 700;
}

.forum-post-head time {
    font-size: .85rem;
    opacity: .65;
    white-space: nowrap;
}

.forum-post-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.forum-post-author small {
    opacity: .65;
}

/* ---------------------------------------------------------
   Rollen
   --------------------------------------------------------- */

.forum-role {
    display: inline-block;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    background: rgba(127, 127, 127, .16);
    opacity: .85;
}

/* ---------------------------------------------------------
   Beitragsinhalt
   --------------------------------------------------------- */

.forum-post-content {
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   Beitrag-Aktionen
   --------------------------------------------------------- */

.forum-post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    font-size: .9rem;
}

.forum-post-actions a {
    color: inherit;
    text-decoration: none;
}

.forum-post-actions a:hover {
    text-decoration: underline;
}

.forum-inline-form {
    display: inline;
    margin: 0;
}

.forum-delete-link {
    padding: 0;
    border: 0;
    background: none;
    color: #dc2626;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.forum-delete-link:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
   Antworten
   --------------------------------------------------------- */

.forum-reply {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(127, 127, 127, .18);
}

.forum-reply h2 {
    margin: 0 0 15px;
}

/* ---------------------------------------------------------
   Hinweise / leerer Inhalt
   --------------------------------------------------------- */

.forum-empty,
.forum-login-note {
    padding: 20px;
    border-radius: 12px;
    background: rgba(127, 127, 127, .08);
    border: 1px solid rgba(127, 127, 127, .18);
    box-sizing: border-box;
}

.forum-login-note {
    margin-top: 20px;
}

/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */

.forum-badge {
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(200, 100, 0, .15);
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .forum-page,
    .forum-wrap {
        margin: 15px auto;
        padding: 0 10px;
    }

    .forum-card {
        padding: 15px;
    }

    .forum-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-card-head .forum-button {
        width: 100%;
    }

    .forum-head,
    .forum-topic-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .forum-category,
    .forum-topic-row {
        align-items: flex-start;
    }

    .forum-category-stats,
    .forum-topic-stats {
        display: none;
    }

    .forum-post-head {
        flex-direction: column;
    }

    .forum-post-head time {
        white-space: normal;
    }

    .forum-form-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .forum-form-actions .forum-button {
        width: 100%;
    }

    .forum-button {
        text-align: center;
    }
}