/* 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.72);
    z-index: 10040;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.nscs-backdrop.hidden { display: none; }

.nscs-banner,
.nscs-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 24px);
    max-width: 920px;
    max-height: min(92vh, 760px);
    background: var(--nscs-bg);
    border-radius: var(--nscs-radius);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.55);
    z-index: 10050;
    padding: 18px 18px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nscs-banner {
    padding-bottom: 16px;
    overflow: auto;
}
.nscs-banner.hidden,
.nscs-modal.hidden { display: none; }

/* Scrollable content; action buttons stay pinned at bottom */
.nscs-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

.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 {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin: 0 -18px 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--nscs-border);
    background: var(--nscs-bg);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.25);
}
.nscs-modal-actions .nscs-btn-primary,
.nscs-modal-actions [data-nscs-save] { margin-left: auto; }
.nscs-modal-actions .nscs-btn {
    flex: 1 1 auto;
    text-align: center;
    min-width: 120px;
}

.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: 48px;
    height: 48px;
    padding: 0;
    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;
    overflow: hidden;
    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; }
.nscs-fab img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    pointer-events: none;
}

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

@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;
    }

    /* Product page sticky buy bar sits above mobile navbar — lift cookie FAB */
    html.ty-root--products-view .nscs-fab,
    body:has(.ty-product-bottom-fixed) .nscs-fab {
        bottom: calc(66px + 57px + env(safe-area-inset-bottom, 0px) + 12px) !important;
    }
}

@media (max-width: 767px) {
    .nscs-banner,
    .nscs-modal {
        width: calc(100% - 16px);
        max-height: min(94vh, 100dvh - 12px);
        padding: 14px 14px 0;
        border-radius: 14px;
    }
    .nscs-root h2 {
        font-size: 17px;
        margin-right: 32px;
    }
    .nscs-intro {
        font-size: 13px;
        margin-bottom: 10px;
    }
    .nscs-cat {
        padding: 10px 0;
    }
    .nscs-cat-text strong { font-size: 14px; }
    .nscs-cat-text p { font-size: 12px; }
    .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;
        margin: 0 -14px 0;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }
    .nscs-modal-actions .nscs-btn-primary,
    .nscs-modal-actions [data-nscs-save],
    .nscs-modal-actions .nscs-btn {
        margin-left: 0;
        width: 100%;
        min-width: 0;
    }
}
