/* Scoped rules resist theme button/heading styles. Customize through plugin settings
   or --nc-* properties. Accept all is the default/primary CTA; Save/Reject stay secondary. */
#nudgd-consent-panel.nudgd-consent-dialog {
  --nc-bg: var(--nc-config-bg,#fff); --nc-text: var(--nc-config-text,#222); --nc-accent: var(--nc-config-accent,#444);
  --nc-border: var(--nc-config-border,var(--nc-accent));
  --nc-button-bg: var(--nc-config-button-bg,var(--nc-bg)); --nc-button-text: var(--nc-config-button-text,var(--nc-text));
  --nc-hover-bg: var(--nc-config-button-hover-bg,#eee); --nc-hover-text: var(--nc-config-button-hover-text,var(--nc-text));
  --nc-default-bg: var(--nc-config-button-default-bg,#182f2e); --nc-default-text: var(--nc-config-button-default-text,#fff);
  --nc-default-hover-bg: var(--nc-config-button-default-hover-bg,#000); --nc-default-hover-text: var(--nc-config-button-default-hover-text,#fff);
  --nc-selected-bg: var(--nc-config-button-selected-bg,#444); --nc-selected-text: var(--nc-config-button-selected-text,#fff);
  --nc-disabled-bg: var(--nc-config-button-disabled-bg,#eee); --nc-disabled-text: var(--nc-config-button-disabled-text,#777);
  --nc-padding: 10px 20px; --nc-radius: 3px; --nc-font-size: 14px; --nc-max-width: 1440px;
  position: fixed; inset: auto 0 0; margin: 0 auto; box-sizing: border-box;
  display: none; grid-template-columns: minmax(0,1fr) 200px; column-gap: 14px; row-gap: 0; align-items: start;
  grid-template-areas: "content actions" "details details" "policy policy";
  width: min(100%,var(--nc-max-width)) !important; min-width: 0 !important; max-width: var(--nc-max-width) !important;
  height: auto !important; min-height: 0 !important; max-height: 70vh; overflow: auto;
  border: 1px solid var(--nc-border) !important; border-radius: var(--nc-radius) var(--nc-radius) 0 0;
  padding: var(--nc-padding); color: var(--nc-text) !important; background: var(--nc-bg) !important;
  font: var(--nc-font-size)/1.4 var(--nc-font-family,system-ui,sans-serif) !important; text-align: left !important;
  text-transform: none !important; letter-spacing: normal !important; z-index: 2147483647;
  box-shadow: 0 -3px 16px rgba(0,0,0,.12);
}
#nudgd-consent-panel[open] { display: grid !important; }
#nudgd-consent-panel .nudgd-consent-content { grid-area: content; min-width: 0; overflow-wrap: anywhere; }
/* Full/wide only: keep intro clear of the vertical CTA stack. Compact sets column-gap: 0. */
#nudgd-consent-panel.nudgd-consent-dialog:not(.nudgd-consent-compact) {
  column-gap: 32px;
}
#nudgd-consent-panel .nudgd-consent-actions {
  grid-area: actions; min-width: 0; align-self: start;
  display: flex !important; flex-direction: column; gap: 4px; justify-content: flex-start;
}
#nudgd-consent-panel :is(h2,p,strong,label,summary,a) {
  font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important;
  color: var(--nc-text) !important; text-shadow: none !important; text-align: left !important;
}
#nudgd-consent-panel h2 { font-size: 18px !important; font-weight: 700 !important; line-height: 1.3 !important; margin: 0 0 3px !important; }
#nudgd-consent-panel :is(p,strong,label,summary,a) { font-size: inherit !important; line-height: 1.4 !important; }
#nudgd-consent-panel p { margin: 2px 0 2px !important; }
#nudgd-consent-panel .nudgd-consent-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; margin-top: 2px; }
#nudgd-consent-panel .nudgd-consent-options { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
#nudgd-consent-panel .nudgd-consent-options p { margin-bottom: 0; }
#nudgd-consent-panel .nudgd-consent-category { flex: 0 0 auto; min-width: 0; }
#nudgd-consent-panel label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
#nudgd-consent-panel input { width: 18px; height: 18px; accent-color: var(--nc-accent); flex: 0 0 18px; }
#nudgd-consent-panel .nudgd-consent-category label {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px;
  position: relative; min-height: 36px; width: auto; max-width: none; box-sizing: border-box; cursor: pointer;
}
#nudgd-consent-panel .nudgd-consent-category label:has(input:disabled) { cursor: default; }
#nudgd-consent-panel .nudgd-consent-category span { min-width: 0; overflow-wrap: anywhere; }
#nudgd-consent-panel .nudgd-consent-category small { display: inline; font: 400 11px/1.3 var(--nc-font-family,system-ui,sans-serif); }
#nudgd-consent-panel .nudgd-consent-category small[hidden] { display: none; }
#nudgd-consent-panel .nudgd-consent-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
#nudgd-consent-panel .nudgd-consent-category input {
  appearance: none !important; position: relative; width: 36px !important; height: 20px !important;
  flex: 0 0 36px; margin: 0 !important; padding: 0 !important; border: 1px solid var(--nc-border) !important;
  border-radius: 20px !important; background: var(--nc-bg) !important; cursor: inherit;
}
#nudgd-consent-panel .nudgd-consent-category input::before {
  content: ''; position: absolute; width: 14px; height: 14px; inset: 2px auto auto 2px;
  background: var(--nc-text); border-radius: 50%; pointer-events: none;
}
#nudgd-consent-panel .nudgd-consent-category input:checked { background: var(--nc-selected-bg) !important; }
#nudgd-consent-panel .nudgd-consent-category input:checked::before { left: 18px; background: var(--nc-selected-text); }
#nudgd-consent-panel .nudgd-consent-category input:indeterminate { background: var(--nc-selected-bg) !important; opacity: 0.55; }
#nudgd-consent-panel .nudgd-consent-category input:indeterminate::before { left: 10px; background: var(--nc-selected-text); }
#nudgd-consent-panel .nudgd-consent-category input:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 3px; }
#nudgd-consent-panel .nudgd-consent-category input:disabled { opacity: 0.85; pointer-events: none; cursor: default; }
#nudgd-consent-panel .nudgd-consent-details-toggle {
  appearance: none !important; background: none !important; background-image: none !important;
  border: 0 !important; box-shadow: none !important; padding: 0 6px !important; margin: 0 !important;
  min-height: 36px; font: 400 14px/1.4 var(--nc-font-family,system-ui,sans-serif) !important;
  color: var(--nc-text) !important; text-decoration: underline !important; text-transform: none !important;
  letter-spacing: normal !important; cursor: pointer; flex: 0 0 auto;
}
#nudgd-consent-panel .nudgd-consent-details-toggle::after { content: ' >'; }
#nudgd-consent-panel .nudgd-consent-details-toggle:is(:hover,:focus-visible) {
  background: none !important; color: var(--nc-text) !important; text-decoration: underline !important;
}
#nudgd-consent-panel .nudgd-consent-actions button,
#nudgd-consent-settings.nudgd-consent-settings {
  appearance: none !important; background: var(--nc-button-bg,var(--nc-bg)) !important; background-image: none !important;
  color: var(--nc-button-text,var(--nc-text)) !important; border: 1px solid var(--nc-border,var(--nc-accent)) !important;
  border-radius: var(--nc-radius,3px) !important; padding: 6px 12px !important;
  font: 600 14px/1.25 var(--nc-font-family,system-ui,sans-serif) !important; text-transform: none !important;
  letter-spacing: normal !important; text-shadow: none !important; box-shadow: none !important;
  cursor: pointer; min-height: 34px; margin: 0 !important; opacity: 1;
}
#nudgd-consent-panel .nudgd-consent-actions button:is(:hover,:focus-visible),
#nudgd-consent-settings.nudgd-consent-settings:is(:hover,:focus-visible) {
  background: var(--nc-hover-bg,#eee) !important; color: var(--nc-hover-text,var(--nc-text)) !important;
  border-color: var(--nc-border,var(--nc-accent)) !important; background-image: none !important; box-shadow: none !important;
  text-decoration: underline !important;
}
#nudgd-consent-panel .nudgd-consent-actions button.nudgd-consent-default {
  background: var(--nc-default-bg,#182f2e) !important; color: var(--nc-default-text,#fff) !important;
  border-color: var(--nc-default-bg,#182f2e) !important; font-weight: 700 !important;
  text-decoration: none !important;
}
#nudgd-consent-panel .nudgd-consent-actions button.nudgd-consent-default:is(:hover,:focus-visible) {
  background: var(--nc-default-hover-bg,#000) !important; color: var(--nc-default-hover-text,#fff) !important;
  border-color: var(--nc-default-hover-bg,#000) !important; text-decoration: none !important;
}
#nudgd-consent-panel .nudgd-consent-actions button.nudgd-consent-default:is(:active,[aria-pressed=true]) {
  background: var(--nc-selected-bg) !important; color: var(--nc-selected-text) !important;
  border-color: var(--nc-selected-bg) !important;
}
/* Appearance → Disable Default CTA styling: equal fill for all actions; keep focus ring. */
#nudgd-consent-panel.nudgd-consent-no-default-style .nudgd-consent-actions button.nudgd-consent-default {
  background: var(--nc-button-bg,var(--nc-bg)) !important; color: var(--nc-button-text,var(--nc-text)) !important;
  border-color: var(--nc-border,var(--nc-accent)) !important; font-weight: 600 !important;
  text-decoration: none !important;
}
#nudgd-consent-panel.nudgd-consent-no-default-style .nudgd-consent-actions button.nudgd-consent-default:is(:hover,:focus-visible) {
  background: var(--nc-hover-bg,#eee) !important; color: var(--nc-hover-text,var(--nc-text)) !important;
  border-color: var(--nc-border,var(--nc-accent)) !important; text-decoration: underline !important;
}
#nudgd-consent-panel.nudgd-consent-no-default-style .nudgd-consent-actions button.nudgd-consent-default:is(:active,[aria-pressed=true]) {
  background: var(--nc-selected-bg) !important; color: var(--nc-selected-text) !important;
  border-color: var(--nc-selected-bg) !important;
}
#nudgd-consent-settings.nudgd-consent-settings {
  --nc-bg: var(--nc-config-bg,#fff); --nc-text: var(--nc-config-text,#222); --nc-accent: var(--nc-config-accent,#444);
  --nc-border: var(--nc-config-settings-border,#444);
  --nc-button-bg: var(--nc-config-settings-bg,#fff); --nc-button-text: var(--nc-config-settings-text,#222);
  --nc-hover-bg: var(--nc-config-settings-hover-bg,#eee); --nc-hover-text: var(--nc-config-settings-hover-text,#222);
  --nc-selected-bg: var(--nc-config-settings-selected-bg,#444); --nc-selected-text: var(--nc-config-settings-selected-text,#fff);
  --nc-disabled-bg: var(--nc-config-button-disabled-bg,#eee); --nc-disabled-text: var(--nc-config-button-disabled-text,#777);
  position: fixed; bottom: 12px; left: 12px; z-index: 99999;
}
#nudgd-consent-panel .nudgd-consent-actions button:focus-visible,#nudgd-consent-panel .nudgd-consent-details-toggle:focus-visible,#nudgd-consent-settings:focus-visible { outline: 2px solid var(--nc-accent) !important; outline-offset: 3px !important; }
#nudgd-consent-panel .nudgd-consent-actions button:active, #nudgd-consent-settings.nudgd-consent-settings:active,
#nudgd-consent-panel .nudgd-consent-actions button[aria-pressed=true], #nudgd-consent-settings.nudgd-consent-settings[aria-expanded=true] {
  background: var(--nc-selected-bg) !important; color: var(--nc-selected-text) !important;
}
#nudgd-consent-panel label { padding: 4px 6px; border-radius: var(--nc-radius); }
#nudgd-consent-panel .nudgd-consent-actions button:disabled { background: var(--nc-disabled-bg) !important; color: var(--nc-disabled-text) !important; opacity: 1; cursor: wait; }
/* Overlay status so "Saving…" / errors never grow the banner height. */
#nudgd-consent-panel [role=status] {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  box-sizing: border-box; margin: 0 !important; padding: 6px 20px;
  background: var(--nc-bg); color: var(--nc-text) !important;
  text-align: center !important; pointer-events: none; line-height: 1.4 !important;
}
#nudgd-consent-panel [role=status]:empty { display: none; }
#nudgd-consent-panel .nudgd-policy {
  grid-area: policy; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 20px; margin: 6px 0 0 !important; text-align: center !important;
}
#nudgd-consent-panel .nudgd-policy a { text-align: center !important; }
#nudgd-consent-panel a { color: var(--nc-accent) !important; text-decoration: underline !important; }
.nudgd-lead-form input { display: block; max-width: 100%; padding: 10px; }
#nudgd-consent-panel .nudgd-consent-details { grid-area: details; min-width: 0; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--nc-border); }
#nudgd-consent-panel .nudgd-consent-details[hidden] { display: none !important; }
#nudgd-consent-panel .nudgd-consent-services {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px;
  align-items: stretch; margin: 0;
}
#nudgd-consent-panel .nudgd-consent-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; height: 100%; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--nc-border); border-radius: var(--nc-radius);
}
#nudgd-consent-panel .nudgd-consent-item strong { display: block; margin: 0; overflow-wrap: anywhere; }
#nudgd-consent-panel .nudgd-consent-item p { margin: 0 !important; overflow-wrap: anywhere; }
#nudgd-consent-panel .nudgd-consent-service-meta { display: flex; flex-direction: column; gap: 2px; }
#nudgd-consent-panel .nudgd-consent-service-meta span { display: block; min-width: 0; overflow-wrap: anywhere; }
#nudgd-consent-panel .nudgd-consent-item a { display: block; margin-top: auto; padding-top: 2px; }
/* Compact-only (class added only when Appearance → Compact is on). Normal mode unchanged. */
#nudgd-consent-panel.nudgd-consent-compact {
  /* ~50px wider than 0.3.50 (390→440 / 510→560) so Accept/Customize/Reject keep gap + focus rings. */
  inset: auto 8px 8px auto; margin: 0; width: calc(25vw + 100px) !important; min-width: 440px !important;
  max-width: min(36vw, 560px) !important; max-height: none; --nc-padding: 10px 12px; --nc-font-size: 12px;
  grid-template-columns: 1fr; column-gap: 0; row-gap: 8px;
  grid-template-areas: "content" "actions";
  border-radius: var(--nc-radius); box-shadow: 0 2px 12px rgba(0,0,0,.14);
  align-content: end;
}
#nudgd-consent-panel.nudgd-consent-compact h2,
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-controls,
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-details,
#nudgd-consent-panel.nudgd-consent-compact .nudgd-policy {
  display: none !important;
}
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-content { grid-area: content; }
#nudgd-consent-panel.nudgd-consent-compact [data-copy=intro] {
  /* Room for ~3 lines of localization intro before the low button row. */
  margin: 0 !important; font-size: 12px !important; line-height: 1.35 !important;
  min-height: calc(12px * 1.35 * 3); display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; overflow: hidden;
}
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions {
  /* gap ≥ focus outline (2px) + offset (3px) on both sides so rings do not collide. */
  grid-area: actions; flex-direction: row; flex-wrap: nowrap; gap: 10px; margin: 0;
  align-self: stretch; align-items: stretch;
}
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions button {
  flex: 1 1 0; width: auto; min-width: 0; min-height: 28px; height: auto; padding: 3px 6px !important;
  font-size: 11px !important; font-weight: 600 !important; line-height: 1.2 !important;
  white-space: normal; display: inline-flex !important; align-items: center; justify-content: center;
  text-align: center !important; box-sizing: border-box; align-self: stretch;
}
/* After inline-flex !important so Save selected / hidden actions stay hidden. */
#nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions button[hidden],
#nudgd-consent-panel.nudgd-consent-compact [data-choice=selected] {
  display: none !important;
}
#nudgd-consent-panel.nudgd-consent-compact [data-copy=intro] a {
  color: var(--nc-accent) !important; text-decoration: underline !important;
}
#nudgd-consent-panel.nudgd-consent-compact [data-nudgd-expand]:not([hidden]) { display: inline-flex !important; }
#nudgd-consent-panel.nudgd-consent-compact [role=status] { padding: 4px 8px; }
/* Floating Cookie settings is redundant while the banner itself is open. */
body:has(#nudgd-consent-panel[open]) #nudgd-consent-settings.nudgd-consent-settings {
  display: none !important;
}
@media (max-width: 760px) {
  #nudgd-consent-settings.nudgd-consent-settings[data-mobile-hidden=true] { display: none !important; }
  #nudgd-consent-panel.nudgd-consent-dialog {
    grid-template-columns: 1fr; column-gap: 0; row-gap: 0; max-height: 65vh; --nc-padding: 10px 14px;
    grid-template-areas: "content" "actions" "details" "policy";
  }
  #nudgd-consent-panel [role=status] { padding: 6px 14px; }
  #nudgd-consent-panel .nudgd-consent-actions { margin-top: 6px; }
  #nudgd-consent-panel .nudgd-consent-controls, #nudgd-consent-panel .nudgd-consent-options { gap: 2px 12px; }
  #nudgd-consent-panel .nudgd-consent-category label,
  #nudgd-consent-panel .nudgd-consent-details-toggle { min-height: 44px; }
  #nudgd-consent-panel .nudgd-consent-services { grid-template-columns: 1fr; gap: 8px; }
  #nudgd-consent-panel .nudgd-consent-item { padding: 8px 10px; }
  #nudgd-consent-panel .nudgd-consent-actions { flex-direction: column; gap: 4px; }
  #nudgd-consent-panel .nudgd-consent-actions button { flex: 0 0 auto; width: 100%; min-height: 40px; }
  #nudgd-consent-panel.nudgd-consent-compact {
    inset: auto 0 0 0; width: 100vw !important; min-width: 0 !important; max-width: 100vw !important;
    --nc-padding: 10px 12px; border-radius: var(--nc-radius) var(--nc-radius) 0 0;
    max-height: none; box-shadow: 0 -2px 12px rgba(0,0,0,.12); row-gap: 8px;
  }
  #nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions {
    flex-direction: row; flex-wrap: nowrap; gap: 10px; margin: 0; align-items: stretch;
  }
  #nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions button {
    flex: 1 1 0; width: auto; min-height: 36px; height: auto; padding: 4px 6px !important; font-size: 12px !important;
    display: inline-flex !important; align-items: center; justify-content: center; align-self: stretch;
  }
  #nudgd-consent-panel.nudgd-consent-compact .nudgd-consent-actions button[hidden],
  #nudgd-consent-panel.nudgd-consent-compact [data-choice=selected] {
    display: none !important;
  }
}
[data-nudgd-embed] iframe[data-nudgd-loaded] { width: 100%; aspect-ratio: 16 / 9; border: 0; }
@media (forced-colors: active) {
  #nudgd-consent-panel .nudgd-consent-category input { appearance: auto !important; }
  #nudgd-consent-panel .nudgd-consent-category input::before { display: none; }
}
.nudgd-cookie-declaration { overflow-x: auto; }
.nudgd-cookie-declaration th, .nudgd-cookie-declaration td { padding: 8px; text-align: left; vertical-align: top; }
