/* ---------------------------------------------------------
   ROOT VARIABLES
--------------------------------------------------------- */
:root {
    --header-height: 50px;
    --popup-header-height: 60px;
    --page-gap: 15px;
    --border-radius: 8px;
    --popup-content-width: 1400px;
}

/* ---------------------------------------------------------
   GLOBAL
--------------------------------------------------------- */
body {
    background-color: #eee !important;
    line-height: 150% !important;
}

img { height: auto; }
a { color: #096fae; }

a.link-with-image {
    display: flex;
    gap: 10px;
    align-items: center;
}

a.link-with-image img { width: 16px; }

button:not([type="submit"]) {
    user-select: none;
    transition: all .2s ease-in-out;
    font-size: 14px;
    padding: 0 20px;
    background-color: #096fae;
    color: #fff;
    border: 1px solid #096fae;
    height: 36px;
    cursor: pointer;
    border-radius: 3px;
}

button:hover {
    background-color: #fff;
    color: #096fae;
}

/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */
#dashboard-header {
    position: relative;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: var(--header-height);
    background-color: #000 !important;
}

#dashboard-header > div {
    display: flex;
    align-items: center;
}

#dashboard-header .logo {
    height: 42px;
    margin: 4px var(--page-gap);
    padding-left: 20px;
    padding-right: 20px;
}

#dashboard-header .user-info {
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
}

/* ---------------------------------------------------------
   DASHBOARD
--------------------------------------------------------- */
#dashboard {
    padding: 10px;
    height: calc(100vh - var(--header-height));
    background-color: #2d2d2d;
}

#dashboard .row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 50%;
}

#dashboard .box {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

#dashboard .box.double { flex: 2; }

#dashboard .box-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 20px);
    margin: 10px;
    border-radius: var(--border-radius);
    background-color: #fff;
    box-shadow: 0 2px 3px rgba(0,0,0,.1);
}

#dashboard .box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

#dashboard .box-title {
    font-size: 24px;
    font-weight: bold;
    color: #b4b4b4;
}

#dashboard .box-scroll {
    flex: 1;
    overflow-y: scroll;
    padding: 10px 20px;
    scrollbar-width: none;
}

#dashboard .box-scroll::-webkit-scrollbar { display: none; }

#dashboard-header {
	min-height: 120px;
}

/* ---------------------------------------------------------
   POSTS
--------------------------------------------------------- */
.post-list { color: #fff; }

.post-list .post {
    padding: 5px 10px;
    margin: 0 -10px;
    border-radius: 5px;
    transition: background-color .1s ease-in-out;
    font-size: 14px;
    border: 1px solid transparent;
}

.post-list .post.openPopup:hover {
    background-color: #040404;
    border: 1px solid #fff;
}

.post-list .post.line {
    display: flex;
    padding: 2px 10px;
    color: #00da27;
}

.post-list .post.line > div { flex: 1; }
.post-list .post.line > div:first-child { flex: 2; }

/* ---------------------------------------------------------
   TABS
--------------------------------------------------------- */
.mytabs-container { margin: 4px 0; }

.mytabs-buttons {
    display: flex;
    border-bottom: 2px solid #ccc;
}

.mytabs-buttons button {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    border: none;
    border-right: 1px solid #ccc;
}

.mytabs-buttons button.active {
    background: #f7a821;
    font-weight: bold;
}

.mytabs-content {
    border: 1px solid #ccc;
    border-top: none;
    padding: 15px;
    background: #fff !important;
}

.mytab-pane { display: none; }
.mytab-pane.active { display: block; }

/* ---------------------------------------------------------
   TAB NEWS TABLE
--------------------------------------------------------- */
.tab-news-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: #ffffff;
    color: #000000;
}

.tab-news-table thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
}

.tab-news-table tbody td {
    padding: 14px 10px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}

.tab-news-table tbody tr:hover {
    background: #e2e2e2;
}

.tab-news-table .col-title .excerpt {
    color: #444;
    margin-top: 6px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 600px;
}

.col-date { width: 140px; }
.col-id { width: 80px; text-align: center; }
.col-cats { width: 160px; }

/* ---------------------------------------------------------
   INLINE EXPANDED VIEW
--------------------------------------------------------- */
.inline-expanded {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 20px;
    box-sizing: border-box;
}

.inline-header-fixed {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px;
    border-bottom: 2px solid #0078d4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.inline-header-fixed h2 { margin: 0; }

.inline-scroll {
    overflow-y: auto;
    padding: 20px;
    flex-grow: 1;
    max-width: 1280px;
    margin: 0 auto;
}

.inline-scroll.two-column {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.inline-article {
    flex: 2;
    min-width: 0;
}

.inline-comments {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    background: #fff5ee;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* ---------------------------------------------------------
   COMMENTS
--------------------------------------------------------- */
.acf-comment {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.acf-comment:last-child {
    border-bottom: none;
}

.acf-comment .comment-text {
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.acf-comment .meta {
    font-size: 0.85em;
    color: #666;
}

.show-comment-form {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 14px;
    background: #0a328c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.show-comment-form:hover {
    background: #072766;
}

/* ---------------------------------------------------------
   TABS LAYOUT (FINAL, CLEAN, NO DUPLICATES)
--------------------------------------------------------- */
.tabs-layout-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    flex-wrap: nowrap; /* <-- THIS is the fix */
}


.tabs-left {
    flex: 1 1 auto !important;
    min-width: 0 !important; /* prevents overflow pushing tabs-right down */
}

.tabs-right {
    width: 320px;
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    position: sticky;
    top: 20px;
    flex-shrink: 0;
	z-index: 3;
}

/* ---- COMMENTS SEARCH */
.comments-search-wrapper {
	margin-bottom:24px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e2e2;
}
.comments-header {
	display:none;
}

/* CHECKBOXES */

.datenschutz-row label,
.agb-row label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agb-row {	
	padding-bottom:12px;
}
.agb-row .form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0a328c;
}

.datenschutz-row {	
	padding-bottom:12px;
}
.datenschutz-row .form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0a328c;
}
.agb-wrapper {
	margin-bottom:12px;
}



/* ---------------------------------------------------------
   SEARCH MODAL
--------------------------------------------------------- */

#header-search-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    z-index: 999999 !important;

    display: none;
}

#header-search-modal.is-open {
    display: block;
}

/* Backdrop */
.header-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1;
}

/* Modal content */
.header-search-modal__content {
    position: relative;
    z-index: 2;
    max-width: 70%;
    margin: 10vh auto 0;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

#header-ajax-search-input {
    width: 60vw;
    max-width: 600px;
}

.search-result-category {
    font-size: 14px;
    color: #777;
    margin-top: 3px;
}

.header-search-results-list li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.header-search-results-list li:last-child {
    border-bottom: none;
}

.header-search-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
	padding: 0 10px !important;
    background: none;
    border: none;
    font-size: 28px !important;
    cursor: pointer;
    z-index: 3;
}

.header-search-results-list .search-result-item strong {
    color: #0073e6;
    text-decoration: underline;
    cursor: pointer;
}


.fa-search {
	padding-right: 40px;
    font-size: 24px;
}
.dashboard-search-icon {
	color:#f7a821;
}

.search-text-before {
	font-size: 18px;
	color:#fff;
	padding-right:12px;
}



.comments-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;

    z-index: 999999999 !important;
    pointer-events: auto !important;
}

#comments-modal .comments-modal-content {
    position: relative;
    z-index: 1000000 !important;
}

#comments-modal {
    isolation: isolate;
}

.comments-modal[aria-hidden="false"] {
    display: flex;
}

.comments-modal-content {
    background: #fff;
    width: 80%;
    max-height: 50vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.comments-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto !important;
}
.comments-search-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

#comments-debug {
    position: fixed !important;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 200px;
    background: #111 !important;
    color: #0f0 !important;
    z-index: 999999998 !important;
    pointer-events: auto !important;
}

/* =========================================================
   ABSOLUTER TOP-LAYER FIX FÜR COMMENTS MODAL
   (über WPBakery, Sticky, Transform, Theme-Z-Indices)
========================================================= */

html, body {
    position: static !important;
    z-index: auto !important;
}

/* Modal bekommt eigenen, isolierten Stacking-Kontext */
#comments-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    background: rgba(0,0,0,0.6) !important;

    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;

    isolation: isolate !important; /* ⭐ verhindert Überschreiben durch transform/sticky */
    z-index: 2147483647 !important; /* ⭐ maximaler Wert */
    pointer-events: auto !important;
}

/* Modal sichtbar */
#comments-modal[aria-hidden="false"] {
    display: flex !important;
}

/* Modal-Inhalt */
#comments-modal .comments-modal-content {
    position: relative !important;
    z-index: 2147483648 !important;
    background: #fff;
    width: 80% !important;
    max-height: 50vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
}

/* Close-Button */
.comments-modal-close {
    position: absolute !important;
    right: 15px !important;
    top: 10px !important;
    font-size: 24px !important;
    background: #096fae !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 2147483649 !important;
}
.comments-modal-close:hover {
	color:#fff;
}