/*!
 * Cookie Consent Lite — widget stylesheet (banner + Preference Center modal).
 *
 * Ported from docs/ui-mockup/index.html (approved visual spec) into a standalone stylesheet for
 * the real plugin, per docs/spec-implementation.md §7 (CSS CONTRACT). Selectors match the actual
 * markup in frontend/templates/banner.html and frontend/templates/preference-center.html verbatim
 * (Slot D's output) — every class below exists in one of those two files.
 *
 * SCOPE / OWNERSHIP NOTES (do not "fix" these without re-reading the spec):
 * - This file does NOT declare the #ccl-root{--ccl-*:...} variable block. That block is owned by
 *   class-frontend.php (Slot A), injected as an inline <style id="ccl-vars-inline"> in wp_head from
 *   the live ccl_settings (spec §7.3). Every color/radius rule here reads var(--ccl-x, <fallback>)
 *   so the PHP-injected values always win; the literal fallbacks below only cover the (should-not-
 *   happen) case where that inline style failed to load, and are set to match the settings defaults
 *   in includes/defaults.json (spec §3) for consistency, not copied ad hoc.
 * - No blanket `.ccl-hide { display: none }` rule exists anywhere in this file. The banner hides
 *   via opacity+transform+visibility, and the accordion body hides via
 *   grid-template-rows — display:none would kill both transitions. Only the specific elements that
 *   truly need a hard display:none (close button when disabled, overlay, modal) declare it, scoped
 *   to their own selector.
 * - No `transform: translateZ(0)` anywhere: in the mockup that lived on the preview-harness's
 *   `.stage-inner` to give `position: fixed` a local containing block. The real plugin has no such
 *   ancestor — `fixed` must anchor to the real viewport.
 * - `.ccl-layout-box` is 460px wide (not 400px): the three Vietnamese banner buttons measure
 *   92+117+137px + 2×9px gaps = 364px, which a 400px box (346px inner width) cannot fit on one row.
 * - SPECIFICITY: every selector is anchored on `#ccl-root` (the wrapper class-frontend.php prints
 *   around the whole widget), giving (1,1,0). A bare `.ccl-*` class is (0,1,0) and that was NOT
 *   enough: banner.css is a plugin stylesheet, so on a real site the theme's stylesheet is printed
 *   afterwards and wins every equal-specificity tie. Observed on a live site (Capture5.PNG): the
 *   three banner buttons came out UPPERCASE, grey and wrapped onto two lines. Regression test:
 *   tests/e2e/hostile-theme.spec.js. Do NOT drop the `#ccl-root` prefix from a new rule.
 * - ARMOUR: the reset block below neutralises the properties a host theme commonly sets on every
 *   button/heading and that this file would otherwise never declare (text-transform, letter-spacing,
 *   text-shadow, box-shadow, margin, min-height...). Declaring nothing = inheriting the theme.
 *   Same approach the original CookieYes CSS takes (`.cky-btn{text-shadow:none;box-shadow:none}`,
 *   `text-transform:none`) — and, like the original, without blanket `!important`.
 * - z-index values are pinned by the spec and must not change: .ccl-consent-container=999999,
 *   .ccl-overlay=99999998, .ccl-modal=999999999. The <=560px
 *   mobile block keeps its `!important` (ported as-is): it must beat the desktop positioning rules.
 */

/* =====================================================================================
   SHARED BASE — font family fallback for every top-level widget root
   ===================================================================================== */
#ccl-root .ccl-consent-container{
  font-family: var(--ccl-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

/* =====================================================================================
   NOTICE BANNER (.ccl-consent-container) — shared base for both layouts
   ===================================================================================== */
#ccl-root .ccl-consent-container{
  position: fixed;
  z-index: 999999;
  box-sizing: border-box;
  max-width: calc(100vw - 32px);
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity .32s ease, transform .32s ease, visibility 0s linear 0s;
}
#ccl-root .ccl-consent-container *{ box-sizing: border-box; }

/*
 * The banner is not the only root: the Preference Center modal and its overlay
 * are separate top-level elements under #ccl-root, so they need the same
 * scoped reset. Without it, a theme that leaves
 * box-sizing at the browser default (content-box) makes the modal footer's
 * three flex:1 buttons add their padding on top of the flex-grown width and
 * overflow a wrapper that is clipped by overflow:hidden. Scoped on purpose —
 * a page-wide `*` reset is the host theme's business, not the widget's.
 * Regression test: tests/e2e/hostile-theme.spec.js.
 */
#ccl-root .ccl-modal,
#ccl-root .ccl-modal *,
#ccl-root .ccl-overlay{ box-sizing: border-box; }

/* =====================================================================================
   ARMOUR — must stay ABOVE every component rule below (equal specificity: later wins)
   -------------------------------------------------------------------------------------
   Text properties a theme sets on buttons/headings site-wide. This file never declares
   them per component, so without this block they are simply inherited from the theme.
   ===================================================================================== */
#ccl-root .ccl-consent-container,
#ccl-root .ccl-consent-container *,
#ccl-root .ccl-modal,
#ccl-root .ccl-modal *,
#ccl-root .ccl-overlay{
  text-transform: none;
  letter-spacing: normal;
  word-spacing: normal;
  text-shadow: none;
  font-variant: normal;
  font-style: normal;
}

/* Box properties themes set on every <button>. Kept to the interactive elements so the
   text/layout rules further down stay in charge of everything else.
   NOTE: the `[ccl_preferences]` shortcode button (.ccl-open-preferences) is NOT listed — it
   is printed into post content, outside #ccl-root, and is meant to inherit the theme's own
   button styling so it looks native wherever the author drops it. */
#ccl-root .ccl-btn,
#ccl-root .ccl-banner-btn-close,
#ccl-root .ccl-btn-close,
#ccl-root .ccl-accordion-btn,
#ccl-root .ccl-accordion-chevron{
  box-shadow: none;
  background-image: none;
  text-decoration: none;
  text-indent: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  max-width: none;
  width: auto;
  height: auto;
  float: none;
  vertical-align: middle;
  overflow: visible;
  outline-offset: 0;
}

/* The switch is a restyled checkbox; themes love styling inputs. */
#ccl-root .ccl-switch,
#ccl-root .ccl-switch-input,
#ccl-root .ccl-switch-slider{
  box-shadow: none;
  background-image: none;
  margin: 0;
  min-height: 0;
  max-width: none;
}

#ccl-root .ccl-consent-container.ccl-hide{
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}

@media (prefers-reduced-motion: reduce) {
  #ccl-root .ccl-consent-container{
    transition: opacity .01s linear, visibility 0s linear 0s;
  }
  #ccl-root .ccl-consent-container.ccl-hide{
    transition: opacity .01s linear, visibility 0s linear .01s;
  }
  #ccl-root .ccl-consent-container,
#ccl-root .ccl-consent-container.ccl-hide{
    transform: none !important;
  }
}

/* ---- inner card shell shared by box + bar ---- */
#ccl-root .ccl-notice{
  background: var(--ccl-surface, #ffffff);
  color: var(--ccl-text, #212121);
  box-shadow: var(--ccl-shadow, 0 4px 20px rgba(0, 0, 0, .15));
  position: relative;
  padding: 20px 20px 20px;
}

#ccl-root .ccl-title{
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ccl-text, #212121);
}
#ccl-root .ccl-title:empty{ display: none; }
#ccl-root .ccl-title:not(:empty) + .ccl-notice-des{ margin-top: 8px; }

#ccl-root .ccl-notice-des{
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ccl-text, #212121);
}

#ccl-root .ccl-notice-des a,
#ccl-root .ccl-notice-link{
  color: var(--ccl-link, #0e9488);
  text-decoration: none;
  font-size: inherit;
}
#ccl-root .ccl-notice-des a:hover,
#ccl-root .ccl-notice-link:hover{ text-decoration: underline; }

#ccl-root .ccl-notice-btn-wrapper{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
}

/* ---- buttons (shared across box/bar/mobile) ---- */
#ccl-root .ccl-btn{
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 16px;
  border-radius: calc(var(--ccl-radius, 10px) * .5);
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: opacity .15s ease, filter .15s ease;
  flex: 0 0 auto;
}
#ccl-root .ccl-btn:hover{ opacity: .88; }
#ccl-root .ccl-btn:active{ opacity: .75; }
#ccl-root .ccl-btn:focus-visible{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 2px;
}

#ccl-root .ccl-btn-settings{
  background: var(--ccl-settings-bg, #ffffff);
  color: var(--ccl-settings-text, #333333);
  border-color: var(--ccl-settings-border, #cfcfcf);
}
#ccl-root .ccl-btn-reject{
  background: var(--ccl-reject-bg, #1a6fe0);
  color: var(--ccl-reject-text, #ffffff);
}
#ccl-root .ccl-btn-accept{
  background: var(--ccl-accept-bg, #1a6fe0);
  color: var(--ccl-accept-text, #ffffff);
}

/* ---- close (X) button ---- */
#ccl-root .ccl-banner-btn-close{
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  padding: 5px;
  margin: 0;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ccl-text-muted, #6b7280);
  cursor: pointer;
  border-radius: 50%;
  transition: background-color .15s ease;
}
/* Scoped display:none for the one element that truly needs a hard hide (show_close_button=false) —
   NOT a blanket .ccl-hide rule (see file header). */
#ccl-root .ccl-banner-btn-close.ccl-hide{ display: none; }
#ccl-root .ccl-banner-btn-close:hover{ background-color: rgba(0, 0, 0, .06); }
#ccl-root .ccl-banner-btn-close:focus-visible{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 1px;
}
#ccl-root .ccl-banner-btn-close svg{ width: 14px; height: 14px; display: block; }
#ccl-root .ccl-banner-btn-close svg path{
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ================= LAYOUT: BOX (floating card at a corner/center) ================= */
#ccl-root .ccl-layout-box{
  /* 460px, not 400: the three Vietnamese buttons measure 92+117+137 + 2 gaps = 364px, which does
     not fit the 346px inner width a 400px box leaves — they would wrap to a second row. */
  width: 460px;
}
#ccl-root .ccl-layout-box .ccl-notice{
  border-radius: var(--ccl-radius, 10px);
  border: 1px solid var(--ccl-border, #e5e7eb);
  padding-right: 34px; /* clear the close button */
}
#ccl-root .ccl-layout-box .ccl-notice-btn-wrapper{ justify-content: flex-start; }

#ccl-root .ccl-layout-box.ccl-pos-bottom-left{
  bottom: 24px;
  left: 24px;
  transform: translateY(0);
}
#ccl-root .ccl-layout-box.ccl-pos-bottom-left.ccl-hide{ transform: translateY(16px); }

#ccl-root .ccl-layout-box.ccl-pos-bottom-right{
  bottom: 24px;
  right: 24px;
  transform: translateY(0);
}
#ccl-root .ccl-layout-box.ccl-pos-bottom-right.ccl-hide{ transform: translateY(16px); }

#ccl-root .ccl-layout-box.ccl-pos-bottom-center{
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 0);
}
#ccl-root .ccl-layout-box.ccl-pos-bottom-center.ccl-hide{ transform: translate(-50%, 16px); }

#ccl-root .ccl-layout-box.ccl-pos-top-center{
  top: 24px;
  left: 50%;
  transform: translate(-50%, 0);
}
#ccl-root .ccl-layout-box.ccl-pos-top-center.ccl-hide{ transform: translate(-50%, -16px); }

/* ================= LAYOUT: BAR (full-width strip, top or bottom) ================= */
#ccl-root .ccl-layout-bar{
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
}
#ccl-root .ccl-layout-bar .ccl-notice{
  border-top: 1px solid var(--ccl-border, #e5e7eb);
  border-bottom: 1px solid var(--ccl-border, #e5e7eb);
  padding: 16px 44px 16px 24px; /* right padding clears the close button */
}
#ccl-root .ccl-layout-bar .ccl-banner-btn-close{ right: 16px; }

/* desktop bar: text + buttons share one row */
@media (min-width: 561px){
  #ccl-root .ccl-layout-bar .ccl-notice{
    display: flex;
    align-items: center;
    gap: 28px;
  }
  #ccl-root .ccl-layout-bar .ccl-title,
#ccl-root .ccl-layout-bar .ccl-notice-des{
    flex: 1 1 auto;
    min-width: 0;
  }
  #ccl-root .ccl-layout-bar .ccl-title:not(:empty) + .ccl-notice-des{ margin-top: 0; }
  #ccl-root .ccl-layout-bar .ccl-notice-btn-wrapper{
    margin-top: 0;
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }
}

/* bar sits flush to the pinned edge, both position groups collapse to top/bottom */
#ccl-root .ccl-layout-bar.ccl-pos-bottom-left,
#ccl-root .ccl-layout-bar.ccl-pos-bottom-right,
#ccl-root .ccl-layout-bar.ccl-pos-bottom-center{
  bottom: 0;
  transform: translateY(0);
}
#ccl-root .ccl-layout-bar.ccl-pos-bottom-left.ccl-hide,
#ccl-root .ccl-layout-bar.ccl-pos-bottom-right.ccl-hide,
#ccl-root .ccl-layout-bar.ccl-pos-bottom-center.ccl-hide{
  transform: translateY(100%);
}

#ccl-root .ccl-layout-bar.ccl-pos-top-center{
  top: 0;
  transform: translateY(0);
}
#ccl-root .ccl-layout-bar.ccl-pos-top-center.ccl-hide{
  transform: translateY(-100%);
}

/* ================= MOBILE (<=560px): full-bleed, stacked buttons =================
   !important is intentional here (kept from the mockup) — it must override the desktop layout's
   own position rules above, per spec §7.3 specificity note. */
@media (max-width: 560px){
  #ccl-root .ccl-consent-container,
#ccl-root .ccl-consent-container.ccl-layout-box,
#ccl-root .ccl-consent-container.ccl-layout-bar{
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none;
    transform: none;
  }
  #ccl-root .ccl-consent-container.ccl-pos-bottom-left,
#ccl-root .ccl-consent-container.ccl-pos-bottom-right,
#ccl-root .ccl-consent-container.ccl-pos-bottom-center{
    bottom: 10px !important;
    top: auto !important;
  }
  #ccl-root .ccl-consent-container.ccl-pos-top-center{
    top: 10px !important;
    bottom: auto !important;
  }
  #ccl-root .ccl-consent-container.ccl-hide{
    transform: translateY(12px) !important;
  }
  #ccl-root .ccl-consent-container.ccl-pos-top-center.ccl-hide{
    transform: translateY(-12px) !important;
  }

  #ccl-root .ccl-layout-box .ccl-notice,
#ccl-root .ccl-layout-bar .ccl-notice{
    border-radius: var(--ccl-radius, 10px);
    padding: 18px 34px 18px 18px;
    display: block;
  }
  #ccl-root .ccl-notice-btn-wrapper{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #ccl-root .ccl-btn{
    width: 100%;
    padding: 12px 16px;
    text-align: center;
  }
  /* accept first on mobile for thumb reach */
  #ccl-root .ccl-btn-accept{ order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  #ccl-root .ccl-layout-bar.ccl-hide,
#ccl-root .ccl-layout-box.ccl-hide{
    transform: none !important;
  }
}

/* =====================================================================================
   PREFERENCE CENTER MODAL (.ccl-overlay / .ccl-modal)
   ===================================================================================== */
/* ---------- backdrop ---------- */
#ccl-root .ccl-overlay{
  position: fixed;
  inset: 0;
  background: var(--ccl-overlay, rgba(15, 23, 32, .45));
  z-index: 99999998;
}
/* Scoped display:none — the overlay has no show/hide transition of its own in this contract. */
#ccl-root .ccl-overlay.ccl-hide{
  display: none;
}

/* ---------- modal shell ---------- */
#ccl-root .ccl-modal{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, calc(100% - 32px));
  max-height: min(655px, 85vh);
  z-index: 999999999;
  font-family: var(--ccl-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: var(--ccl-text, #212121);
}
/* Scoped display:none — the modal has no show/hide transition of its own in this contract. */
#ccl-root .ccl-modal.ccl-hide{
  display: none;
}

#ccl-root .ccl-preference-center{
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: min(655px, 85vh);
  overflow: hidden;
  background: var(--ccl-surface, #ffffff);
  border-radius: var(--ccl-radius, 10px);
  box-shadow: var(--ccl-shadow, 0 20px 60px rgba(0, 0, 0, 0.28));
}

/* ---------- header (fixed) ---------- */
#ccl-root .ccl-preference-header{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 18px;
  border-bottom: 1px solid var(--ccl-border, #e5e7eb);
}
#ccl-root .ccl-preference-title{
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ccl-text, #212121);
}
#ccl-root .ccl-modal .ccl-btn-close{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--ccl-text-muted, #6b7280);
  cursor: pointer;
}
#ccl-root .ccl-modal .ccl-btn-close:hover{
  color: var(--ccl-text, #212121);
  background: rgba(0, 0, 0, 0.05);
}
#ccl-root .ccl-modal .ccl-btn-close:focus-visible{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 2px;
}
#ccl-root .ccl-modal .ccl-btn-close svg{
  width: 16px;
  height: 16px;
  display: block;
}

/* ---------- scrollable body ---------- */
#ccl-root .ccl-preference-body-wrapper{
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--ccl-border, #e5e7eb) transparent;
}
#ccl-root .ccl-preference-body-wrapper::-webkit-scrollbar{
  width: 8px;
}
#ccl-root .ccl-preference-body-wrapper::-webkit-scrollbar-track{
  background: transparent;
}
#ccl-root .ccl-preference-body-wrapper::-webkit-scrollbar-thumb{
  background: var(--ccl-border, #e5e7eb);
  border-radius: 10px;
}
#ccl-root .ccl-preference-body-wrapper::-webkit-scrollbar-thumb:hover{
  background: var(--ccl-text-muted, #6b7280);
}

#ccl-root .ccl-preference-content-wrapper{
  padding: 18px 0;
  border-bottom: 1px solid var(--ccl-border, #e5e7eb);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ccl-text, #212121);
}
#ccl-root .ccl-preference-content-wrapper p{
  margin: 0 0 13px;
}
#ccl-root .ccl-preference-content-wrapper p:last-child{
  margin-bottom: 0;
}
#ccl-root .ccl-preference-content-wrapper a{
  color: var(--ccl-link, #0e9488);
  text-decoration: none;
}
#ccl-root .ccl-preference-content-wrapper a:hover{
  text-decoration: underline;
}

/* ---------- accordion ---------- */
#ccl-root .ccl-accordion-wrapper{
  padding: 4px 0 8px;
}
#ccl-root .ccl-accordion{
  border-bottom: 1px solid var(--ccl-border, #e5e7eb);
}
#ccl-root .ccl-accordion:last-child{
  border-bottom: none;
}
#ccl-root .ccl-accordion-item{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  cursor: pointer;
}
#ccl-root .ccl-accordion-chevron{
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ccl-text, #212121);
  transition: transform 0.2s ease-in-out;
}
#ccl-root .ccl-accordion-chevron svg{
  width: 10px;
  height: 10px;
  display: block;
}
#ccl-root .ccl-accordion.ccl-accordion-active .ccl-accordion-chevron{
  transform: rotate(90deg);
}
#ccl-root .ccl-accordion-header{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
#ccl-root .ccl-modal .ccl-accordion-btn{
  flex: 1 1 auto;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ccl-text, #212121);
  cursor: pointer;
}
#ccl-root .ccl-modal .ccl-accordion-btn:focus-visible{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 2px;
  border-radius: 3px;
}
#ccl-root .ccl-always-active{
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--ccl-always-active, #1e8e3e);
  white-space: nowrap;
}

/* toggle switch */
#ccl-root .ccl-switch{
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}
#ccl-root .ccl-switch-input{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#ccl-root .ccl-switch-slider{
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background: var(--ccl-toggle-off, #d0d5d2);
  border-radius: 50px;
  transition: background-color 0.25s ease;
}
#ccl-root .ccl-switch-slider::before{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}
#ccl-root .ccl-switch-input:checked + .ccl-switch-slider{
  background: var(--ccl-toggle-on, #1a6fe0);
}
#ccl-root .ccl-switch-input:checked + .ccl-switch-slider::before{
  transform: translateX(18px);
}
#ccl-root .ccl-switch-input:focus-visible + .ccl-switch-slider{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 2px;
}

/* collapsible description body — animated via grid-template-rows, NOT display:none (see header) */
#ccl-root .ccl-accordion-body{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
#ccl-root .ccl-accordion.ccl-accordion-active .ccl-accordion-body{
  grid-template-rows: 1fr;
}
#ccl-root .ccl-accordion-body > p{
  overflow: hidden;
  min-height: 0;
  margin: 0;
  padding-bottom: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ccl-text-muted, #6b7280);
}
#ccl-root .ccl-accordion.ccl-accordion-active .ccl-accordion-body > p{
  padding-bottom: 18px;
}

/* ---------- footer (fixed) ---------- */
#ccl-root .ccl-footer-wrapper{
  position: relative;
  flex: 0 0 auto;
  border-top: 1px solid var(--ccl-border, #e5e7eb);
}
#ccl-root .ccl-footer-shadow{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 28px;
  display: block;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.06) 100%);
  opacity: 1;
  transition: opacity 0.2s ease;
}
/* Integration hook: banner.js adds this class once the body wrapper is scrolled to its bottom. */
#ccl-root .ccl-footer-shadow.ccl-fade-out{
  opacity: 0;
}
#ccl-root .ccl-prefrence-btn-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
}
#ccl-root .ccl-modal .ccl-btn{
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 5px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s ease;
}
#ccl-root .ccl-modal .ccl-btn:hover{
  opacity: 0.85;
}
#ccl-root .ccl-modal .ccl-btn:focus-visible{
  outline: 2px solid var(--ccl-link, #0e9488);
  outline-offset: 2px;
}
#ccl-root .ccl-modal .ccl-btn-reject{
  background: var(--ccl-reject-bg, #1a6fe0);
  color: var(--ccl-reject-text, #ffffff);
}
#ccl-root .ccl-modal .ccl-btn-accept{
  background: var(--ccl-accept-bg, #1a6fe0);
  color: var(--ccl-accept-text, #ffffff);
}
/* "Lưu lựa chọn của tôi" — dedicated colors (spec §0.7/§7.2), deliberately NOT wired to
   --ccl-accept-* so it can be styled independently from the Accept button. */
#ccl-root .ccl-modal .ccl-btn-save{
  background: var(--ccl-save-bg, #1a6fe0);
  color: var(--ccl-save-text, #ffffff);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  #ccl-root .ccl-accordion-chevron,
#ccl-root .ccl-accordion-body,
#ccl-root .ccl-switch-slider,
#ccl-root .ccl-switch-slider::before,
#ccl-root .ccl-footer-shadow,
#ccl-root .ccl-modal .ccl-btn{
    transition: none !important;
  }
}

/* ---------- mobile: near-fullscreen, stacked footer ---------- */
@media (max-width: 560px){
  #ccl-root .ccl-modal{
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
  }
  #ccl-root .ccl-preference-center{
    border-radius: 0;
    max-height: 100%;
  }
  #ccl-root .ccl-preference-header{
    padding: 16px 20px 14px;
  }
  #ccl-root .ccl-preference-body-wrapper{
    padding: 0 20px;
  }
  #ccl-root .ccl-prefrence-btn-wrapper{
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
  }
  #ccl-root .ccl-modal .ccl-btn{
    flex: 0 0 auto;
    width: 100%;
  }
}
