/* consentManager by techNEO - Frontend-Banner */

#tn-cm-root,
#tn-cm-root * {
    box-sizing: border-box;
}

#tn-cm-root[hidden] {
    display: none;
}

.tn-cm-banner {
    position: fixed;
    z-index: 99990;
    background: #ffffff;
    color: #1e293b;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    padding: 22px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Box-Layout (unten rechts) */
.tn-cm-layout-box .tn-cm-banner {
    right: 20px;
    bottom: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
}

/* Bar-Layout (volle Breite unten) */
.tn-cm-layout-bar .tn-cm-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    padding: 22px max(20px, 5vw);
}

.tn-cm-layout-bar .tn-cm-actions {
    max-width: 1200px;
}

.tn-cm-banner-head {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.tn-cm-banner-text {
    color: #475569;
    margin-bottom: 12px;
}

.tn-cm-links {
    margin-bottom: 14px;
    font-size: 13px;
}

.tn-cm-links a {
    color: #0b6aa2;
    text-decoration: none;
}

.tn-cm-links a:hover {
    text-decoration: underline;
}

.tn-cm-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

/* Kategorien */
.tn-cm-details {
    margin: 4px 0 16px;
    max-height: 38vh;
    overflow-y: auto;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
    padding: 10px 2px;
}

.tn-cm-cat {
    padding: 10px 6px;
    border-bottom: 1px solid #f4f7fa;
}

.tn-cm-cat:last-child {
    border-bottom: none;
}

.tn-cm-cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.tn-cm-cat-head input {
    width: 18px;
    height: 18px;
    accent-color: #14AAF5;
    cursor: pointer;
}

.tn-cm-cat-head input:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.tn-cm-cat-name em {
    font-weight: 400;
    font-size: 12px;
    color: #94a3b8;
}

.tn-cm-cat-desc {
    margin-top: 4px;
    padding-left: 28px;
    color: #64748b;
    font-size: 13px;
}

/* Aktionen / Buttons */
.tn-cm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: center;
}

.tn-cm-btn-primary {
    background: linear-gradient(135deg, #14AAF5 0%, #0d8bd4 100%);
    color: #fff;
}
.tn-cm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 170, 245, 0.35);
}

.tn-cm-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}
.tn-cm-btn-secondary:hover { background: #e2e8f0; }

.tn-cm-btn-ghost {
    background: #ffffff;
    color: #0b6aa2;
    border-color: #cdd9e5;
}
.tn-cm-btn-ghost:hover { background: #f1f5f9; }

.tn-cm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Box & Center: gleich breite Buttons in einer Reihe */
.tn-cm-layout-box .tn-cm-actions .tn-cm-btn,
.tn-cm-layout-center .tn-cm-actions .tn-cm-btn {
    flex: 1 1 0;
    min-width: 110px;
}

/* Bar: Buttons rechtsbündig, "Einstellungen" links */
.tn-cm-layout-bar .tn-cm-actions { align-items: center; }
.tn-cm-layout-bar .tn-cm-actions .tn-cm-btn-ghost { margin-right: auto; }

/* Re-Open-Button (fixiert unten links) */
.tn-cm-reopen {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 99980;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #0b6aa2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.tn-cm-reopen:hover {
    transform: scale(1.08);
}

@media (max-width: 520px) {
    .tn-cm-layout-box .tn-cm-banner {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
    }
    .tn-cm-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .tn-cm-actions .tn-cm-btn {
        width: 100%;
        flex: 1 1 auto;
    }
    .tn-cm-layout-bar .tn-cm-actions .tn-cm-btn-ghost { margin-right: 0; }
}

/* Center-Layout (mittiger Dialog mit Overlay) */
#tn-cm-root.tn-cm-layout-center:not([hidden]) {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 20px;
}
.tn-cm-layout-center .tn-cm-banner {
    position: relative;
    top: auto; left: auto; right: auto; bottom: auto;
    width: 480px;
    max-width: 100%;
}

/* Einstellungen-Popup (Kategorien) – für alle Layouts */
.tn-cm-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.tn-cm-modal-box {
    background: #ffffff;
    color: #1e293b;
    width: 540px;
    max-width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.tn-cm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #eef2f6;
}
.tn-cm-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}
.tn-cm-modal-close:hover { color: #0f172a; }
.tn-cm-modal-body {
    padding: 12px 22px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.5;
}
.tn-cm-modal-foot {
    padding: 14px 22px;
    border-top: 1px solid #eef2f6;
    background: #fbfcfe;
}
.tn-cm-modal-foot .tn-cm-btn { flex: 1 1 0; min-width: 110px; }

/* iFrame-Platzhalter (Opt-in-Blocking) */
.tn-cm-ph {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.tn-cm-ph-inner { max-width: 460px; }
.tn-cm-ph-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 14px;
}
.tn-cm-ph-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}