/* =========================================================
   ForumNext v2.10.4 — Hero Back Button Right Placement / Bronze Shell Hero Tabs
========================================================= */

body.design-system-core-active .forumnext-page-shell,
body.st-origin .forumnext-page-shell,
.forumnext-page-shell{
    position:relative;
    isolation:isolate;
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0 0 24px 0;
    padding:18px;
    border:1px solid rgba(214,152,69,.32);
    border-radius:24px;
    background:
        radial-gradient(ellipse at 18% 18%, rgba(255,153,0,.090), transparent 58%),
        radial-gradient(ellipse at 82% 72%, rgba(180,96,28,.060), transparent 62%),
        linear-gradient(135deg,
            rgba(44,25,12,.245) 0%,
            rgba(22,14,8,.205) 28%,
            rgba(10,8,6,.965) 52%,
            rgba(30,18,9,.180) 76%,
            rgba(48,27,12,.205) 100%
        ),
        linear-gradient(180deg, rgba(10,8,6,.985), rgba(5,5,4,.995));
    box-shadow:
        0 22px 54px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,231,184,.045),
        inset 0 0 72px rgba(255,153,0,.018);
    overflow:hidden;
}

.forumnext-page-shell::before{
    content:'';
    position:absolute;
    inset:1px;
    border-radius:23px;
    pointer-events:none;
    background:
        linear-gradient(135deg, rgba(255,190,89,.038), transparent 35%, rgba(255,153,0,.026) 68%, transparent 100%),
        linear-gradient(180deg, rgba(255,190,89,.026), transparent 48%, rgba(255,153,0,.016) 100%);
    opacity:.92;
    z-index:0;
}

.forumnext-page-shell > *{position:relative;z-index:1;}

.forumnext-hero-tabs{
    position:relative;
    z-index:2;
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:8px;
    padding:0 12px;
    margin:0 0 -1px 0;
}

.forumnext-hero-tab{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-height:48px;
    padding:0 20px;
    border:1px solid rgba(214,152,69,.34);
    border-bottom-color:rgba(214,152,69,.22);
    border-radius:16px 16px 0 0;
    background:linear-gradient(180deg, rgba(42,26,14,.88), rgba(12,9,7,.98));
    color:#efd5ae;
    text-decoration:none;
    font-weight:900;
    letter-spacing:.01em;
    box-shadow:inset 0 1px 0 rgba(255,230,178,.045);
    transition:background .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
}

.forumnext-hero-tab:hover{
    color:#fff1d7;
    border-color:rgba(255,190,89,.46);
    background:linear-gradient(180deg, rgba(62,36,15,.96), rgba(18,12,8,.99));
    transform:translateY(-1px);
}

.forumnext-hero-tab.is-active{
    color:#fff1d7;
    border-color:rgba(255,190,89,.56);
    border-bottom-color:rgba(42,25,13,.96);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255,153,0,.15), transparent 55%),
        linear-gradient(180deg, rgba(67,38,16,.98), rgba(20,13,8,.99));
}

.forumnext-page-shell .forumnext-hero,
.forumnext-page-shell .forumnext-admin-hero,
.forumnext-page-shell .forumnext-topic-titlebar{
    margin-top:0;
    margin-bottom:18px;
    padding:26px 28px;
    border-color:rgba(214,152,69,.42) !important;
    background:
        radial-gradient(ellipse at 14% 10%, rgba(255,153,0,.115), transparent 42%),
        linear-gradient(135deg, rgba(78,44,16,.92) 0%, rgba(20,13,8,.985) 70%, rgba(8,7,5,.995) 100%) !important;
    box-shadow:
        0 16px 36px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,231,184,.065) !important;
}


.forumnext-page-shell .forumnext-breadcrumb,
.forumnext-page-shell .forumnext-panel,
.forumnext-page-shell .forumnext-category-block,
.forumnext-page-shell .forumnext-topic-table,
.forumnext-page-shell .forumnext-post,
.forumnext-page-shell .forumnext-reply-form,
.forumnext-page-shell .forumnext-create-form,
.forumnext-page-shell .forumnext-admin-form,
.forumnext-page-shell .forumnext-admin-edit-card,
.forumnext-page-shell .forumnext-admin-category-section,
.forumnext-page-shell .forumnext-pagination,
.forumnext-page-shell .forumnext-empty-state{max-width:100%;box-sizing:border-box;}

/* v2.10.2: Die alte Breadcrumb-/Zwischenleiste darf nicht mehr zwischen Hero-Tabs und Hero-Box liegen. */

.forumnext-page-shell .forumnext-hero-tabs + .forumnext-hero,
.forumnext-page-shell .forumnext-hero-tabs + .forumnext-admin-hero,
.forumnext-page-shell .forumnext-hero-tabs + .forumnext-topic-titlebar{
    margin-top:0 !important;
}

.forumnext-page-shell .forumnext-breadcrumb,
.forumnext-page-shell nav.forumnext-breadcrumb{
    display:none !important;
    margin:0 !important;
    padding:0 !important;
}

.forumnext-page-shell .forumnext-panel:has(.forumnext-back){
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    margin:0 0 14px 0 !important;
}

/* v2.10.3: Zurück-zum-Forum nicht mehr als eigene Zwischenbox zwischen Tabs und Inhalt anzeigen.
   Die Rücknavigation läuft über den bestehenden Übersicht-Reiter. */
.forumnext-page-shell > .forumnext-panel:has(.forumnext-back),
.forumnext-page-shell .forumnext-back{
    display:none !important;
}


/* v2.10.4: Rücknavigation nicht als Zwischenbox, sondern rechts im Hero-Bereich. */
.forumnext-page-shell .forumnext-hero-actions{
    margin-left:auto;
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    flex:0 0 auto;
}

.forumnext-page-shell .forumnext-hero-back-button{
    white-space:nowrap;
    min-height:38px;
    padding:9px 14px;
    border-radius:12px;
    background:linear-gradient(180deg, rgba(47,29,15,.94), rgba(14,10,7,.98)) !important;
    border:1px solid rgba(214,152,69,.42) !important;
    color:#ffe1b7 !important;
    box-shadow:inset 0 1px 0 rgba(255,231,184,.055), 0 10px 22px rgba(0,0,0,.24) !important;
}

.forumnext-page-shell .forumnext-hero-back-button:hover{
    background:linear-gradient(180deg, rgba(70,41,17,.98), rgba(20,13,8,.99)) !important;
    border-color:rgba(255,190,89,.58) !important;
    color:#fff1d7 !important;
}

.forumnext-page-shell .forumnext-topic-titlebar{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    flex-wrap:wrap;
}

.forumnext-page-shell .forumnext-topic-titlebar-main{
    min-width:0;
    flex:1 1 420px;
}

.forumnext-page-shell .forumnext-topic-titlebar-actions{
    padding-top:2px;
}

@media(max-width:900px){
    .forumnext-page-shell{padding:14px;border-radius:20px;}
    .forumnext-page-shell::before{border-radius:19px;}
    .forumnext-hero-tabs{padding:0 6px;gap:6px;}
    .forumnext-hero-tab{min-height:44px;padding:0 14px;font-size:14px;}
    .forumnext-page-shell .forumnext-hero,
    .forumnext-page-shell .forumnext-admin-hero,
    .forumnext-page-shell .forumnext-topic-titlebar{padding:22px 20px;}
    .forumnext-page-shell .forumnext-hero-actions{width:100%;justify-content:flex-start;margin-left:0;}
}

@media(max-width:640px){
    .forumnext-hero-tabs{align-items:stretch;}
    .forumnext-hero-tab{flex:1 1 calc(50% - 8px);border-radius:14px;min-height:42px;}
    .forumnext-hero-tab.is-active{border-bottom-color:rgba(255,190,89,.56);}
}
