/* netSEO Cookies Script — CookieScript-inspired dark CMP */
.nscs-root {
    --nscs-bg: #1a1a1a;
    --nscs-bg2: #111;
    --nscs-text: #fff;
    --nscs-muted: #9a9a9a;
    --nscs-accent: #00b4d8;
    --nscs-accept: #2ecc71;
    --nscs-border: #333;
    --nscs-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--nscs-text);
}

.nscs-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10040;
}
.nscs-backdrop.hidden { display: none; }

.nscs-banner,
.nscs-modal {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 920px;
    background: var(--nscs-bg);
    border-radius: var(--nscs-radius);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    z-index: 10050;
    padding: 22px 20px 18px;
    box-sizing: border-box;
}
.nscs-banner { bottom: 16px; }
.nscs-modal {
    top: 50%;
    transform: translate(-50%, -50%);
    max-height: min(90vh, 720px);
    overflow: auto;
}
.nscs-banner.hidden,
.nscs-modal.hidden { display: none; }

.nscs-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--nscs-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}
.nscs-close:hover { opacity: 1; }

.nscs-root h2 {
    margin: 0 40px 10px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.nscs-intro {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #ddd;
}
.nscs-link { color: var(--nscs-accent); text-decoration: none; }
.nscs-link:hover { text-decoration: underline; }

.nscs-quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border: 1px solid var(--nscs-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.nscs-quick-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-right: 1px solid var(--nscs-border);
    font-size: 11px;
    text-align: center;
    cursor: pointer;
    margin: 0;
}
.nscs-quick-cat:last-child { border-right: 0; }
.nscs-quick-cat input { accent-color: var(--nscs-accent); width: 18px; height: 18px; }
.nscs-quick-cat span { color: #ccc; line-height: 1.25; }

.nscs-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.nscs-banner-btns-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nscs-btn {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: 1px solid transparent;
    text-transform: uppercase;
}
.nscs-btn-ghost {
    background: transparent;
    border: 0;
    color: var(--nscs-text);
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0;
    padding-left: 0;
}
.nscs-btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}
.nscs-btn-accept {
    background: var(--nscs-accept);
    color: #fff;
    border-color: var(--nscs-accept);
}
.nscs-btn-primary {
    background: var(--nscs-accent);
    color: #111;
    border-color: var(--nscs-accent);
}

.nscs-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--nscs-border);
    margin-bottom: 14px;
}
.nscs-tab {
    background: none;
    border: 0;
    color: var(--nscs-muted);
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.nscs-tab.active {
    color: var(--nscs-accent);
    border-bottom-color: var(--nscs-accent);
}

.nscs-cat {
    border-bottom: 1px solid var(--nscs-border);
    padding: 14px 0;
}
.nscs-cat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.nscs-cat-text strong { display: block; margin-bottom: 4px; font-size: 15px; }
.nscs-cat-text p { margin: 0; font-size: 13px; color: var(--nscs-muted); line-height: 1.45; }

.nscs-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.nscs-switch input { opacity: 0; width: 0; height: 0; }
.nscs-switch span {
    position: absolute;
    inset: 0;
    background: #444;
    border-radius: 26px;
    transition: 0.2s;
}
.nscs-switch span:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.nscs-switch input:checked + span { background: var(--nscs-accent); }
.nscs-switch input:checked + span:before { transform: translateX(20px); }
.nscs-switch input:disabled + span { opacity: 0.55; }

.nscs-toggle-cookies {
    background: none;
    border: 0;
    color: var(--nscs-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px 0 0;
    cursor: pointer;
}
.nscs-cat-cookies.hidden { display: none; }

.nscs-table-wrap { overflow-x: auto; margin-top: 8px; }
.nscs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.nscs-table th,
.nscs-table td {
    border: 1px solid var(--nscs-border);
    padding: 8px;
    text-align: left;
    vertical-align: top;
    color: #e8e8e8 !important;
    background: #1a1a1a !important;
}
.nscs-table th { background: #222 !important; color: #cfcfcf !important; }
.nscs-empty { color: var(--nscs-muted); font-size: 13px; margin: 8px 0 0; }

.nscs-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
}
.nscs-modal-actions .nscs-btn-primary,
.nscs-modal-actions [data-nscs-save] { margin-left: auto; }

.nscs-about { font-size: 14px; line-height: 1.55; color: #ccc; }
.nscs-about p,
.nscs-about li,
.nscs-about strong { color: #d8d8d8; }
.nscs-about a { color: var(--nscs-accent) !important; text-decoration: none; }
.nscs-about a:hover { text-decoration: underline; }

/* Floating bubble — bottom left */
.nscs-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    pointer-events: auto;
}
.nscs-fab:hover {
    transform: scale(1.06);
    background: #151515;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.nscs-fab.hidden { display: none; }

/* Behind Unitheme swipe / overlay menus */
body.nscs-menu-behind .nscs-banner,
body.nscs-menu-behind .nscs-modal,
body.nscs-menu-behind .nscs-backdrop {
    z-index: 100 !important;
    pointer-events: none;
}

body.nscs-menu-behind .nscs-fab {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.nscs-open { overflow: hidden; }

/* Unitheme mobile: sticky bottom bar (~66px) + swipe menu (z-index ~10001) */
@media (max-width: 1023px) {
    .nscs-fab {
        z-index: 900;
        left: 12px;
        bottom: calc(66px + env(safe-area-inset-bottom, 0px) + 10px);
        width: 38px;
        height: 38px;
    }

    body.sticky-panel .nscs-fab {
        bottom: calc(66px + env(safe-area-inset-bottom, 0px) + 10px);
    }
}

@media (max-width: 767px) {
    .nscs-quick-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nscs-quick-cat:nth-child(2n) { border-right: 0; }
    .nscs-banner-btns-right {
        width: 100%;
        justify-content: stretch;
    }
    .nscs-banner-btns-right .nscs-btn { flex: 1; text-align: center; }
    .nscs-modal-actions { flex-direction: column; }
    .nscs-modal-actions .nscs-btn-primary,
    .nscs-modal-actions [data-nscs-save] { margin-left: 0; width: 100%; }
}
