Skip to content

CSS Classes Reference

The banner DOM exposes multiple CSS classes. Most are customizable. .ag-branding and its children (.ag-cookie-mark, .ag-bite, .ag-cr1, .ag-cr2, .ag-cr3) are protected and cannot be styled via custom CSS.

Each card shows:

  • Selector — the CSS class name to use in your rules
  • Role badge — container, text, interactive, overlay, or branding
  • DOM path — where it sits in the tree
  • Default properties — what the template recipe sets (expandable)
  • Tokens used — which design tokens control defaults for this element
  • GDPR warnings/errors — if this selector has compliance implications

All classes are scoped inside a Shadow Root. Write selectors as you normally would — no Shadow DOM prefix needed in your custom CSS.

Your custom CSS is injected into all three consent shadow roots: the banner (#ag-consent-banner-host), the floating privacy trigger (#ag-privacy-trigger), and the preferences popup (#ag-privacy-popup-host). Banner selectors simply never match inside the trigger/popup roots and vice versa, so one stylesheet safely styles all three surfaces. The trigger and popup classes are listed in their own section below.

.ag-overlay
overlay customizable
DOM path: .ag-overlay

Full-viewport fixed-position backdrop. Hosts the banner inside. Neither shows nor takes clicks while the visitor has folded the banner (it carries .minimized then), or when the owner has switched the backdrop off.

HTML context
<div class="ag-overlay" id="ag-overlay">
Default properties
PropertyValue
positionfixed
inset0
backgroundvar(--surface-overlay)
z-index2147483646
Tokens used: --surface-overlay
.ag-banner
container customizable
DOM path: .ag-overlay > .ag-banner

Visual surface of the banner — background, border, shadow, position. Renders template-specific signature decorations via ::before/::after. Carries .minimized while the visitor has folded the banner into a strip (only when visitors may minimize it). aria-modal is false then, and on a banner whose backdrop the owner has switched off.

HTML context
<div class="ag-banner" role="dialog" aria-modal="true">
Default properties
PropertyValue
backgroundvar(--surface)
colorvar(--surface-text)
border-radiusvar(--radius)
box-shadowvar(--shadow)
bordervar(--border-style)
font-familyvar(--font-family)
z-index2147483647
positionrelative
animationvar(--animation)
.ag-banner-inner
container customizable
DOM path: .ag-banner > .ag-banner-inner

Layout container — padding, max-width, grid/flex. Holds all content.

HTML context
<div class="ag-banner-inner">
Default properties
PropertyValue
padding22px
.ag-content
container customizable
DOM path: .ag-banner-inner > .ag-content

Wrapper around title + description + GPC notice.

HTML context
<div class="ag-content">
Default properties
PropertyValue
displayblock
min-width0
.ag-btns
container customizable
DOM path: .ag-banner-inner > .ag-btns

Button row holding Reject all, Accept all, Accept selected. All three must remain visually equal weight (GDPR).

HTML context
<div class="ag-btns">
Default properties
PropertyValue
displayflex
gap10px
flex-wrapwrap
Warning: Changing display:flex may break responsive wrapping on mobile.
.ag-bar-cats
container customizable
DOM path: .ag-banner-inner > .ag-bar-cats

Settings Card containing label, Customize button, and category chip list.

HTML context
<div class="ag-bar-cats">
.ag-bar-cats-header
container customizable
DOM path: .ag-bar-cats > .ag-bar-cats-header

Header row of Settings Card with label + Customize toggle.

HTML context
<div class="ag-bar-cats-header">
.ag-bar-cats-list
container customizable
DOM path: .ag-bar-cats > .ag-bar-cats-list

Wrapper for category chip toggles. Not shown in the floating layout, nor in any layout of a compact banner.

HTML context
<div class="ag-bar-cats-list">
.ag-detail
container customizable
DOM path: .ag-banner-inner > .ag-detail

Expandable detail panel. Hidden until Customize is clicked.

HTML context
<div class="ag-detail" role="region" aria-hidden="true|false">
.ag-detail-grid
container customizable
DOM path: .ag-detail > .ag-detail-grid

Grid container for 4 category cards.

HTML context
<div class="ag-detail-grid">
.ag-detail-cat
container customizable
DOM path: .ag-detail-grid > .ag-detail-cat

Category card holding title + toggle + description.

HTML context
<div class="ag-detail-cat">
.ag-detail-cat-head
container customizable
DOM path: .ag-detail-cat > .ag-detail-cat-head

Header row of category card.

HTML context
<div class="ag-detail-cat-head">
.ag-links
container customizable
DOM path: .ag-banner-inner > .ag-links

Footer row with privacy + cookie policy links.

HTML context
<div class="ag-links">
Default properties
PropertyValue
displayflex
gap14px
justify-contentcenter
flex-wrapwrap
font-size11px
.ag-title
text customizable
DOM path: .ag-content > .ag-title

Banner heading. Holds title text from BannerTranslation.

HTML context
<div class="ag-title" id="ag-title">
Default properties
PropertyValue
font-sizevar(--font-heading-size)
font-weight700
line-height1.25
margin-bottom6px
letter-spacing-0.005em
Tokens used: --font-heading-size
.ag-desc
text customizable
DOM path: .ag-content > .ag-desc

Banner description text. May contain HTML (links, paragraphs) sanitized server-side.

HTML context
<div class="ag-desc" id="ag-desc">
Default properties
PropertyValue
font-sizevar(--font-body-size)
colorvar(--surface-text-muted)
line-height1.6
margin-bottom14px
max-width64ch
.ag-bar-cats-label
text customizable
DOM path: .ag-bar-cats-header > .ag-bar-cats-label

Label text for the Settings Card header (e.g., "Cookie categories").

HTML context
<span class="ag-bar-cats-label">
Tokens used: --surface-text-muted
.ag-detail-cat-name
text customizable
DOM path: .ag-detail-cat-head > .ag-detail-cat-name

Category name text.

HTML context
<div class="ag-detail-cat-name" id="...">
.ag-detail-cat-desc
text customizable
DOM path: .ag-detail-cat > .ag-detail-cat-desc

Category description text.

HTML context
<div class="ag-detail-cat-desc">
Tokens used: --surface-text-muted
.ag-gpc-notice
text customizable
DOM path: .ag-content > .ag-gpc-notice

Notice shown while the browser's Global Privacy Control signal applies and its refusal is in force, not over the visitor's own choice.

HTML context
<div class="ag-gpc-notice"> (only while Global Privacy Control applies and the visitor has not chosen over it)
Default properties
PropertyValue
backgroundvar(--category-bg)
border1px solid var(--surface-border)
.ag-btn
interactive customizable
DOM path: .ag-btns > .ag-btn

Base styling for all 3 consent decision buttons.

HTML context
<button class="ag-btn" id="ag-{reject-all|accept-all|accept-selected}">
Default properties
PropertyValue
flex1 1 0
min-height44px
min-width100px
padding11px 18px
font-sizevar(--font-button-size)
font-weight600
border-radiusvar(--radius)
backgroundvar(--btn-fill)
colorvar(--btn-text)
border1px solid var(--btn-border)
Warning: All 3 buttons must keep visually equal weight under GDPR (EDPB 5/2020, CNIL 2020/091).
Warning: Do not differentiate background/shadow between Accept and Reject.
.ag-bar-cat
interactive customizable
DOM path: .ag-bar-cats-list > .ag-bar-cat

Category toggle chip. Adds .on class when active. Necessary category is locked.

HTML context
<button class="ag-bar-cat" data-cat="preferences|statistics|marketing">
GDPR: Pre-checking non-necessary categories invalidates consent (Planet49 CJEU 2019).
.ag-detail-toggle
interactive customizable
DOM path: .ag-detail-cat-head > .ag-detail-toggle

Switch for a category: a button that Tab reaches and Enter or Space flips; disabled for Necessary.

HTML context
<button class="ag-detail-toggle" id="ag-t-{category}" role="switch" aria-checked="false">
GDPR: Pre-styling as :checked when state is unchecked is invalid consent.
.ag-link
interactive customizable
DOM path: .ag-links > .ag-link

Individual policy link.

HTML context
<a class="ag-link" href="..." target="_blank">
Default properties
PropertyValue
colorvar(--accent-on-surface)
text-decorationunderline
.ag-bar-cat-dot
interactive customizable
DOM path: .ag-bar-cat > .ag-bar-cat-dot

Decorative dot indicator inside a category chip.

HTML context
<span class="ag-bar-cat-dot">
.btn-primary
interactive customizable
DOM path: .ag-btns > .ag-btn.btn-primary

Modifier on .ag-btn for primary action — Accept all. Combine: `.ag-btn.btn-primary`.

HTML context
<button class="ag-btn btn-primary" id="ag-accept-all">
Warning: Must maintain equal visual weight to .btn-secondary (EDPB 05/2020 §86).
.btn-secondary
interactive customizable
DOM path: .ag-btns > .ag-btn.btn-secondary

Modifier on .ag-btn for secondary action — Reject all. Combine: `.ag-btn.btn-secondary`.

HTML context
<button class="ag-btn btn-secondary" id="ag-reject-all">
Warning: Must maintain equal visual weight to .btn-primary (EDPB 05/2020 §86).
.btn-save
interactive customizable
DOM path: .ag-btns > .ag-btn.btn-save

Modifier on .ag-btn for Accept Selected (visible in granular mode). Combine: `.ag-btn.btn-save`.

HTML context
<button class="ag-btn btn-save" id="ag-accept-selected" hidden>
Default properties
PropertyValue
displaynone (hidden until granular mode activated)
.btn-tertiary
interactive customizable
DOM path: .ag-bar-cats-header > .ag-btn.btn-tertiary

Modifier on .ag-btn for Customize toggle. Combine: `.ag-btn.btn-tertiary`.

HTML context
<button class="ag-btn btn-tertiary" id="ag-toggle-details">
.ag-lang-select
interactive customizable
DOM path: .ag-banner-inner > .ag-lang-select

Language switcher dropdown.

HTML context
<select class="ag-lang-select"> (only when multiple translations, and the language switcher setting shows it)
.ag-minimize
interactive customizable
DOM path: .ag-banner > .ag-minimize

Folds the banner into a strip and unfolds it. Decides nothing about consent.

HTML context
<button class="ag-minimize" id="ag-minimize"> (only when visitors may minimize the banner and have not decided yet)
Default properties
PropertyValue
positionabsolute
top8px
right8px
width32px
height32px
.ag-logo
media customizable
DOM path: .ag-banner-inner > .ag-logo

Customer logo above content. Keeps its own proportions, aligned to the start.

HTML context
<img class="ag-logo" src="..."> (only when logoUrl is set)
Default properties
PropertyValue
align-selfflex-start
max-height32px
max-widthmin(200px, 100%)
object-fitcontain
margin-bottom10px

The floating privacy trigger and its preferences popup render in their own shadow roots (#ag-privacy-trigger and #ag-privacy-popup-host). Since v2026.08.04 your custom CSS reaches both, and the classes below are stable API — safe to target in production stylesheets.

.ag-trigger-btn
interactive customizable
DOM path: #ag-privacy-trigger (shadow root) > .ag-trigger-btn

Floating round privacy-trigger button shown after a consent decision. Reopens the preferences popup.

HTML context
<button class="ag-trigger-btn" aria-label="Cookie settings">
Default properties
PropertyValue
width44px
height44px
border-radius50%
backgroundvar(--trigger-bg, var(--accent))
box-shadow0 2px 8px rgba(0,0,0,0.3)
.ag-mark
branding protected
DOM path: #ag-privacy-trigger (shadow root) > .ag-trigger-btn > .ag-mark

KookiOk mark on the privacy button: a cookie on its edge, which opens into the word on hover and keyboard focus. **Protected**: cannot be modified via custom CSS.

Protected: Protected branding: the first cascade layer of the trigger stylesheet locks it, and custom CSS targeting this selector returns HTTP 422. Only a paid plan that removes the KookiOk branding takes it off the button.
HTML context
<span class="ag-mark" aria-hidden="true"><svg>…</svg><b>KookiOk</b></span>
.ag-popup
container customizable
DOM path: #ag-privacy-popup-host (shadow root) > .ag-popup

Preferences popup card opened by the privacy trigger. Shows current consent per category, consent date/ID, and Change/Withdraw actions. Its background is laid on an opaque white (light theme) or black (dark theme) base, so the page never shows through.

HTML context
<div class="ag-popup">
Default properties
PropertyValue
positionfixed
box-sizingborder-box
width342px
max-widthcalc(100vw - 32px)
backgroundvar(--surface)
colorvar(--surface-text)
border-radiusvar(--radius)
padding20px
border1px solid var(--surface-border)
font-familyvar(--font-family)
z-index2147483645
.ag-popup-header
container customizable
DOM path: .ag-popup > .ag-popup-header

Header row of the preferences popup with title and close button.

HTML context
<div class="ag-popup-header">
Default properties
PropertyValue
displayflex
justify-contentspace-between
margin-bottom12px
.ag-popup-title
text customizable
DOM path: .ag-popup-header > .ag-popup-title

Popup heading text: the privacyTriggerTitle translation, or cookieSettingsText for the default where no regulation applies (nobody decided it).

HTML context
<strong class="ag-popup-title">
Default properties
PropertyValue
font-size15px
font-weight700
.ag-popup-close
interactive customizable
DOM path: .ag-popup-header > .ag-popup-close

Close button (×) of the preferences popup.

HTML context
<button id="ag-popup-close" class="ag-popup-close" aria-label="Close">
Default properties
PropertyValue
backgroundnone
bordernone
font-size18px
colorvar(--surface-text)
Tokens used: --surface-text
.ag-popup-cat
container customizable
DOM path: .ag-popup > .ag-popup-cat

Row showing one cookie category with its accepted/declined status icon.

HTML context
<div class="ag-popup-cat"> (one per category)
Default properties
PropertyValue
displayflex
align-itemscenter
gap8px
padding6px 0
.ag-popup-cat-icon
media customizable
DOM path: .ag-popup-cat > .ag-popup-cat-icon

Check/cross status icon per category. `.accepted` uses --accent, `.declined` uses --surface-text-subtle.

HTML context
<span class="ag-popup-cat-icon accepted|declined">
Default properties
PropertyValue
width18px
height18px
Warning: Accepted and declined states must stay visually distinguishable — styling both identically misrepresents the stored consent.
.ag-popup-cat-label
text customizable
DOM path: .ag-popup-cat > .ag-popup-cat-label

Category name text in the popup status list.

HTML context
<span class="ag-popup-cat-label">
Default properties
PropertyValue
font-size13px
colorvar(--surface-text)
Tokens used: --surface-text
.ag-popup-meta
text customizable
DOM path: .ag-popup > .ag-popup-meta

Decision metadata block: the date of the decision and its consent ID (.ag-popup-id). For the default where no regulation applies only the date ("Allowed by default"): nothing was recorded.

HTML context
<div class="ag-popup-meta"> (when a decision is stored and has a date or a consent ID to show)
Default properties
PropertyValue
font-size11px
colorvar(--surface-text-muted)
border-top1px solid var(--surface-border)
.ag-popup-id
text customizable
DOM path: .ag-popup-meta > .ag-popup-id

Consent ID line of the metadata block; breaks anywhere so the ID fits the popup.

HTML context
<div class="ag-popup-id"> (not for the default where no regulation applies)
Default properties
PropertyValue
word-breakbreak-all
.ag-popup-actions
container customizable
DOM path: .ag-popup > .ag-popup-actions

Action row holding the change and withdraw buttons (privacyTriggerChange and privacyTriggerWithdraw; customizeSettingsText and rejectAllText for the default where no regulation applies).

HTML context
<div class="ag-popup-actions">
Default properties
PropertyValue
displayflex
gap8px
margin-top14px
Warning: Hiding this container hides the withdrawal path — consent withdrawal must remain as easy as giving consent (GDPR Art. 7(3)).
.ag-popup-btn
interactive customizable
DOM path: .ag-popup-actions > .ag-popup-btn

Popup action button (privacyTriggerChange / privacyTriggerWithdraw, or customizeSettingsText / rejectAllText for the default where no regulation applies). Shares the banner button tokens.

HTML context
<button id="ag-popup-{change|withdraw}" class="ag-popup-btn">
Default properties
PropertyValue
padding10px 16px
border1px solid var(--btn-border)
border-radiusvar(--radius)
font-size13px
font-weight600
backgroundvar(--btn-fill)
colorvar(--btn-text)
flex1
Warning: #ag-popup-withdraw carries a runtime inline !important lock on geometry and interactivity (display, visibility, opacity, pointer-events, content-visibility, transform + scale/translate/rotate, position, margin, offset-path, z-index, clip, clip-path, overflow, filter, mask-image, text-indent, min-width/min-height). Rules targeting those properties on that button have no effect. Colours and typography remain customizable.
Warning: Hiding an ancestor (.ag-popup-actions or .ag-popup) still removes the withdrawal control — the lock cannot override a display:none ancestor.
.ag-branding
branding protected
DOM path: .ag-banner-inner > .ag-branding

Powered by Kookiok attribution. **Protected** — cannot be modified via custom CSS.

Protected: Protected attribution: inline !important styles at render time prevent any external CSS override, and custom CSS targeting this selector returns HTTP 422. Only a paid plan that removes the KookiOk branding takes the badge off the banner. The privacy popup ends with the same element.
HTML context
<div class="ag-branding" style="display:flex !important; ...">
.ag-cookie-mark
branding protected
DOM path: .ag-branding a > .ag-cookie-mark

Animated cookie SVG inside branding attribution. **Protected**.

Protected: Part of the protected branding element.
HTML context
<svg class="ag-cookie-mark">
.ag-bite
branding protected
DOM path: .ag-cookie-mark > .ag-bite

Cookie bite shape inside the branding SVG animation. **Protected**.

Protected: Part of the protected branding cookie SVG animation.
HTML context
<path class="ag-bite">
.ag-cr1
branding protected
DOM path: .ag-cookie-mark > .ag-cr1

Cookie crumb animation element 1 within branding mark. **Protected**.

Protected: Cookie crumb animation elements within branding mark.
HTML context
<circle class="ag-cr1">
.ag-cr2
branding protected
DOM path: .ag-cookie-mark > .ag-cr2

Cookie crumb animation element 2 within branding mark. **Protected**.

Protected: Cookie crumb animation elements within branding mark.
HTML context
<circle class="ag-cr2">
.ag-cr3
branding protected
DOM path: .ag-cookie-mark > .ag-cr3

Cookie crumb animation element 3 within branding mark. **Protected**.

Protected: Cookie crumb animation elements within branding mark.
HTML context
<circle class="ag-cr3">
.ag-mark
branding protected
DOM path: #ag-privacy-trigger (shadow root) > .ag-trigger-btn > .ag-mark

KookiOk mark on the privacy button: a cookie on its edge, which opens into the word on hover and keyboard focus. **Protected**: cannot be modified via custom CSS.

Protected: Protected branding: the first cascade layer of the trigger stylesheet locks it, and custom CSS targeting this selector returns HTTP 422. Only a paid plan that removes the KookiOk branding takes it off the button.
HTML context
<span class="ag-mark" aria-hidden="true"><svg>…</svg><b>KookiOk</b></span>