html:has(#cookiebanner[style*="bottom: 0"]) {
  overflow: hidden;
}
/* ==========================================================================
   CookieBot Custom Banner — Preferences Panel
   Matches the CookieBot by Usercentrics default preference center styling
   ========================================================================== */

/* ------------------------------------------------------------------
   OVERLAY — blocks all clicks and scrolling on page content behind
   the banner. CookieBot generates #CybotCookiebotDialogBodyUnderlay
   but pointer-events may not be set. This ensures it blocks all
   interaction with the page until the user makes a consent choice.
------------------------------------------------------------------ */
#CybotCookiebotDialogBodyUnderlay,
#CybotCookiebotDialogDetail,
.CybotCookiebotDialogBodyUnderlay {
  pointer-events: all !important;
  cursor:         default !important;
}

/* Lock body scroll when banner is active */
body.cookiebot-active {
  overflow:       hidden !important;
  pointer-events: none !important;
}

/* Re-enable pointer events on the banner itself */
body.cookiebot-active #cookiebanner,
body.cookiebot-active #CybotCookiebotDialog {
  pointer-events: all !important;
}

/* ------------------------------------------------------------------
   VARIABLES
------------------------------------------------------------------ */
:root {
  --cb-orange:       #F5821F;
  --cb-orange-hover: #E06F0C;
  --cb-white:        #FFFFFF;
  --cb-bg-light:     #F9F9F9;
  --cb-border:       #E5E5E5;
  --cb-text:         #333333;
  --cb-text-muted:   #666666;
  --cb-badge-bg:     #EEEEEE;
  --cb-radius:       4px;
  --cb-font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ------------------------------------------------------------------
   PREFERENCES PANEL CONTAINER
------------------------------------------------------------------ */
#c-preferences {
  background:    var(--cb-white);
  border-radius: var(--cb-radius);
  font-family:   var(--cb-font);
  font-size:     14px;
  color:         var(--cb-text);
  line-height:   1.5;
  padding:       24px;
  box-sizing:    border-box;
}

/* ------------------------------------------------------------------
   MOBILE — full screen takeover with scroll
------------------------------------------------------------------ */
@media (max-width: 768px) {

  #c-preferences {
    position:   fixed;
    top:        0;
    left:       0;
    right:      0;
    bottom:     0;
    z-index:    99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth momentum scroll on iOS */
    border-radius: 0;
    padding:    16px;
  }

  /* Keep the footer buttons visible and anchored to bottom */
  #c-preferences-footer {
    position:   sticky;
    bottom:     0;
    background: var(--cb-white);
    padding:    12px 0 8px;
    margin-top: 12px;
  }

}

/* ------------------------------------------------------------------
   HEADER (logo + title)
------------------------------------------------------------------ */
#c-preferences-header {
  display:        flex;
  align-items:    center;
  gap:            16px;
  padding-bottom: 16px;
  border-bottom:  1px solid var(--cb-border);
  margin-bottom:  16px;
}

#c-preferences-header .c-header {
  margin:      0;
  font-size:   16px;
  font-weight: 600;
  color:       var(--cb-text);
}

#syn-cb-logo-prefs {
  height: 40px;
  width:  auto;
}

/* ------------------------------------------------------------------
   PREFERENCES BODY
------------------------------------------------------------------ */
#c-preferences-body {
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------------
   CATEGORY ROW
------------------------------------------------------------------ */
.c-pref-category {
  border-bottom: 1px solid var(--cb-border);
  padding:       14px 0;
}

.c-pref-category:last-child {
  border-bottom: none;
}

/* ------------------------------------------------------------------
   CATEGORY HEADER ROW (chevron + name + badge + toggle)
------------------------------------------------------------------ */
.c-pref-category-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  cursor:          pointer;
  user-select:     none;
}

/* Chevron via ::before on the label */
.c-pref-label {
  display:     flex;
  align-items: center;
  gap:         10px;
  font-size:   15px;
  font-weight: 600;
  color:       var(--cb-text);
  cursor:      pointer;
  flex:        1;
}

.c-pref-label::before {
  display: none;
}

/* Cookie count badge */
.c-pref-badge {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  background:       var(--cb-badge-bg);
  color:            var(--cb-text-muted);
  font-size:        11px;
  font-weight:      600;
  border-radius:    10px;
  padding:          2px 7px;
  min-width:        22px;
}

/* ------------------------------------------------------------------
   CHECKBOX (native, unstyled — prototype only)
------------------------------------------------------------------ */
.c-pref-category-header input[type="checkbox"] {
  width:        18px;
  height:       18px;
  flex-shrink:  0;
  cursor:       pointer;
  accent-color: var(--cb-orange);
}

.c-pref-category-header input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ------------------------------------------------------------------
   ALWAYS ON LABEL (Necessary)
------------------------------------------------------------------ */
.c-pref-always-on {
  font-size:   11px;
  font-weight: 500;
  color:       var(--cb-orange);
  background:  rgba(245, 130, 31, 0.1);
  border:      1px solid rgba(245, 130, 31, 0.3);
  border-radius: 10px;
  padding:     2px 8px;
  margin-left: 4px;
}

/* ------------------------------------------------------------------
   CATEGORY DESCRIPTION TEXT
------------------------------------------------------------------ */
.c-pref-description {
  margin:    10px 0 0 26px;
  font-size: 13px;
  color:     var(--cb-text-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------------
   PREFERENCES FOOTER (buttons)
------------------------------------------------------------------ */
#c-preferences-footer {
  display:         flex;
  align-items:     center;
  justify-content: flex-end;
  gap:             12px;
  padding-top:     20px;
  border-top:      1px solid var(--cb-border);
  margin-top:      16px;
}

/* Back button — text style */
.c-button-back {
  background:     transparent;
  border:         none;
  color:          var(--cb-text-muted);
  font-size:      13px;
  text-decoration: underline;
  cursor:         pointer;
  padding:        0;
  margin-right:   auto;
}

.c-button-back:hover {
  color: var(--cb-text);
}

/* Allow selection — outline style */
.c-button-selection {
  background:    var(--cb-white);
  border:        1px solid var(--cb-border);
  color:         var(--cb-text);
  font-size:     14px;
  font-weight:   500;
  padding:       10px 20px;
  border-radius: var(--cb-radius);
  cursor:        pointer;
  text-decoration: none;
  transition:    border-color 0.15s ease;
}

.c-button-selection:hover {
  border-color: var(--cb-text-muted);
}

/* Save / Allow all — orange filled */
.c-button-accept {
  background:    var(--cb-orange);
  border:        1px solid var(--cb-orange);
  color:         var(--cb-white);
  font-size:     14px;
  font-weight:   600;
  padding:       10px 20px;
  border-radius: var(--cb-radius);
  cursor:        pointer;
  text-decoration: none;
  transition:    background 0.15s ease;
}

.c-button-accept:hover {
  background:   var(--cb-orange-hover);
  border-color: var(--cb-orange-hover);
}
