/* 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;
}

/* Datenschutz-/Impressum-Links nutzen die Shop-Linkfarbe (kein Akzent-Override) */
.tn-cm-links a {
    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[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tn-cm-cat-head input[type="checkbox"]:checked {
    background-color: var(--tn-cm-accent, #14AAF5);
    border-color: var(--tn-cm-accent, #14AAF5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-11'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.tn-cm-cat-head input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.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: var(--tn-cm-primary-bg, linear-gradient(135deg, #14AAF5 0%, #0d8bd4 100%));
    color: var(--tn-cm-primary-text, #fff);
}
.tn-cm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.tn-cm-btn-secondary {
    background: var(--tn-cm-secondary-bg, #f1f5f9);
    color: var(--tn-cm-secondary-text, #334155);
    border-color: rgba(0, 0, 0, 0.08);
}
.tn-cm-btn-secondary:hover { filter: brightness(0.96); }

.tn-cm-btn-ghost {
    background: var(--tn-cm-ghost-bg, #ffffff);
    color: var(--tn-cm-ghost-text, var(--tn-cm-accent-dark, #0b6aa2));
    border-color: rgba(0, 0, 0, 0.12);
}
.tn-cm-btn-ghost:hover { filter: brightness(0.97); }

.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: var(--tn-cm-accent-dark, #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: 640px;
    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 auto; min-width: 0; white-space: nowrap; padding-left: 12px; padding-right: 12px; }

/* 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;
}
/* Dienste-/Quellenliste im Einstellungen-Popup */
.tn-cm-cat-services { margin: 8px 0 2px; padding-left: 30px; }
.tn-cm-svc-item { padding: 6px 0; border-top: 1px solid #f1f5f9; }
.tn-cm-svc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.tn-cm-svc-name { color: #334155; }
.tn-cm-svc-more { color: var(--tn-cm-accent-dark, #0b6aa2); text-decoration: none; font-size: 12px; white-space: nowrap; }
.tn-cm-svc-more:hover { text-decoration: underline; }
.tn-cm-svc-info { margin-top: 6px; padding: 8px 10px; background: #f8fafc; border-radius: 6px; font-size: 12px; color: #64748b; line-height: 1.5; }
.tn-cm-svc-meta { margin-bottom: 3px; }
.tn-cm-svc-meta a { color: var(--tn-cm-accent-dark, #0b6aa2); }