.cb-root { position: relative; z-index: 999999; font-family: inherit; color: var(--cb-text, #17202a); }
.cb-root [hidden] { display: none !important; }
.cb-banner, .cb-preferences { position: fixed; z-index: 999999; box-sizing: border-box; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; right: 16px; bottom: 16px; padding: 24px; background: var(--cb-background, #fff); color: var(--cb-text, #17202a); border: 1px solid var(--cb-border, #d9dee5); border-radius: 14px; box-shadow: 0 12px 48px rgba(0,0,0,.22); }
.cb-banner h2, .cb-preferences h2 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.3; }
.cb-banner p, .cb-preferences p { margin: 0 0 12px; font-size: .95rem; line-height: 1.5; }
.cb-links { display: flex; gap: 16px; flex-wrap: wrap; }
.cb-links a { text-decoration: underline; }
.cb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cb-button, .cb-inline-settings { appearance: none; border: 1px solid var(--cb-control-border, #747e8b); border-radius: 7px; background: var(--cb-background, #fff); color: var(--cb-text, #17202a); padding: 10px 14px; font: inherit; font-size: .92rem; line-height: 1.2; cursor: pointer; }
.cb-button:hover, .cb-inline-settings:hover { filter: brightness(.96); }
.cb-button:focus-visible, .cb-reopen:focus-visible, .cb-inline-settings:focus-visible { outline: 3px solid var(--cb-link, #276ef1); outline-offset: 2px; }
.cb-button.cb-primary { background: var(--cb-accent, #17202a); color: var(--cb-accent-text, #fff); border-color: var(--cb-accent, #17202a); }
.cb-button.cb-text-button { text-decoration: underline; border-color: transparent; }
.cb-preferences { width: min(560px, calc(100vw - 32px)); }
.cb-category { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--cb-border, #e5e8ec); }
.cb-category strong { display: block; margin-bottom: 4px; }
.cb-category p { margin: 0; font-size: .88rem; color: var(--cb-muted, #4d5967); }
.cb-toggle { position: relative; display: inline-flex; flex: 0 0 46px; width: 46px; height: 26px; }
.cb-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb-slider { position: absolute; inset: 0; cursor: pointer; background: var(--cb-control-border, #8b95a1); border-radius: 999px; transition: .15s; }
.cb-slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 4px; top: 4px; border-radius: 50%; background: var(--cb-background, #fff); transition: .15s; }
.cb-toggle input:checked + .cb-slider { background: var(--cb-accent, #1e6b43); }
.cb-toggle input:checked + .cb-slider:before { transform: translateX(20px); }
.cb-toggle input:focus-visible + .cb-slider { outline: 3px solid var(--cb-link, #276ef1); outline-offset: 3px; }
.cb-toggle input:disabled + .cb-slider { opacity: .7; cursor: not-allowed; }
.cb-reopen { position: fixed; z-index: 999998; right: 12px; bottom: 12px; border: 1px solid var(--cb-control-border, #697586); background: var(--cb-background, #fff); color: var(--cb-text, #17202a); border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.12); cursor: pointer; }
.cb-root.cb-open .cb-reopen { display: none; }
.cb-root.cb-consented .cb-reopen { display: block; }
.cb-powered { font-size: 10px; opacity: .65; }
@media (max-width: 560px) {
  .cb-banner, .cb-preferences { right: 8px; bottom: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 18px; }
  .cb-actions { display: grid; grid-template-columns: 1fr; }
  .cb-button { width: 100%; }
}
/* Respect the initial hidden state even if a theme overrides [hidden]. */
#cb-root[hidden] { display: none !important; }

/* Keep interactive elements legible on both light and dark theme palettes. */
.cb-root .cb-button.cb-primary { background: var(--cb-accent, #17202a); color: var(--cb-accent-text, #ffffff); border-color: var(--cb-accent, #17202a); }
.cb-root .cb-links a { color: var(--cb-link, #17202a); }
.cb-root .cb-banner h2, .cb-root .cb-preferences h2, .cb-root .cb-category strong { color: var(--cb-text, #17202a); }
.cb-root .cb-slider::before { background: #ffffff; }
.cb-root .cb-toggle input:checked + .cb-slider::before { background: var(--cb-accent-text, #ffffff); }
