.nsc-root { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999; padding: 1rem; }
.nsc-root.nsc-hidden { display: none; }
.nsc-banner {
  background: var(--nsc-card-bg); color: var(--nsc-card-text);
  border-radius: var(--nsc-radius); padding: 1.25rem 1.5rem;
  max-width: 920px; margin: 0 auto; box-shadow: 0 12px 40px rgba(0,0,0,.22);
  max-height: 85vh; overflow-y: auto; font-family: inherit;
}
/* Explicit colours so a host theme's h2/p rules can't bleed in (e.g. white-on-white). */
.nsc-heading { font-size: 1.1rem; font-weight: 600; margin: 0 0 .35rem; color: var(--nsc-card-text); }
.nsc-body { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--nsc-card-text); opacity: .8; }

/* Per-category toggle rows — hidden until the bar is expanded */
.nsc-cats { display: none; gap: .5rem; margin: 1rem 0 0; }
.nsc-banner.nsc-is-expanded .nsc-cats { display: grid; }
.nsc-cat { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(0,0,0,.03); border-radius: calc(var(--nsc-radius) * .5); padding: .8rem 1rem; }
.nsc-cat-text { display: flex; flex-direction: column; gap: .15rem; }
.nsc-cat-label { font-weight: 600; font-size: .95rem; color: var(--nsc-card-text); }
.nsc-cat-desc { font-size: .82rem; color: var(--nsc-card-text); opacity: .65; }
.nsc-badge { font-size: .68rem; font-weight: 500; background: rgba(0,0,0,.08); border-radius: 4px; padding: .1rem .4rem; margin-left: .35rem; }

.nsc-actions { display: flex; gap: .6rem; margin-top: 1rem; justify-content: flex-end; flex-wrap: wrap; }
.nsc-btn { border: 0; border-radius: calc(var(--nsc-radius) * .5); padding: .7rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; }
.nsc-btn-ghost { background: transparent; color: var(--nsc-card-text); border: 1px solid rgba(0,0,0,.15); }
.nsc-btn-decline { background: var(--nsc-decline-bg); color: var(--nsc-decline-text); }
.nsc-btn-accept { background: var(--nsc-accept-bg); color: var(--nsc-accept-text); }
.nsc-foot { margin-top: .75rem; text-align: center; }
.nsc-policy-link { font-size: .82rem; color: inherit; opacity: .7; }

/* Toggle switch */
.nsc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.nsc-switch input { opacity: 0; width: 0; height: 0; }
.nsc-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s; }
.nsc-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.nsc-switch input:checked + .nsc-slider { background: var(--nsc-accent); }
.nsc-switch input:checked + .nsc-slider::before { transform: translateX(20px); }
.nsc-switch input:disabled + .nsc-slider { opacity: .85; }

/* Live services table on the Cookie Policy page — scrolls horizontally on mobile
   instead of pushing the page off the edge. */
.nsc-policy-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; max-width: 100%; }
.nsc-policy-table { border-collapse: collapse; width: 100%; min-width: 520px; }
.nsc-policy-table th, .nsc-policy-table td { text-align: left; padding: .5rem .75rem; border: 1px solid rgba(0,0,0,.1); vertical-align: top; }
/* Button on the Cookie Policy page (and any custom trigger) that re-opens the preferences panel */
.nsc-open-prefs { display: inline-block; border: 0; cursor: pointer; font: inherit; margin-top: 1rem;
  background: var(--nsc-accept-bg, #111827); color: var(--nsc-accept-text, #fff);
  border-radius: var(--nsc-radius, 8px); padding: .6rem 1.1rem; font-weight: 600; }
.nsc-blocked-iframe { background: #f2f2f2; min-height: 200px; }
@media (max-width: 640px) {
  .nsc-banner { padding: 1.1rem 1.15rem; }
  .nsc-actions { flex-direction: column; align-items: stretch; gap: .5rem; }
  .nsc-btn { width: 100%; flex: none; }
  .nsc-cat { gap: .75rem; }
}
