/* ==========================================================
   DataLock Cookie Consent — Frontend UI
   ========================================================== */

:root {
  --ccbv-primary: #2e038c;
  --ccbv-primary-2: #4b1bd6;
  --ccbv-ui-bg: #ffffff;
  --ccbv-ui-bg-2: #fbfbfe;
  --ccbv-ui-text: #0f172a;
  --ccbv-ui-muted: rgba(15, 23, 42, 0.68);
  --ccbv-ui-border: rgba(15, 23, 42, 0.12);
  --ccbv-ui-radius: 16px;
  --ccbv-ui-radius-sm: 12px;
  --ccbv-ui-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
  --ccbv-ui-shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.16);
  --ccbv-ui-focus: 0 0 0 3px rgba(46, 3, 140, 0.20);
}

/* Shared hidden state */
.ccbv-hidden,
.cookie-consent-overlay.ccbv-hidden,
#cookie-ccbv-preferences.ccbv-hidden {
  display: none !important;
}

/* ==========================================================
   Consent overlay
   ========================================================== */

.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background: var(--ccbv-backdrop, rgba(0, 0, 0, 0.6));
  /*backdrop-filter: blur(2px);*/
}

/* Main consent surface */
.cookie-manage-content {
  width: 100%;
  max-width: 680px;
  padding: 2rem 2rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  font-family: inherit;
  background: var(--ccbv-bg, var(--ccbv-ui-bg));
  color: var(--ccbv-text, var(--ccbv-ui-text));
  border: 1px solid var(--ccbv-ui-border);
  border-radius: var(--ccbv-ui-radius);
  box-shadow: var(--ccbv-ui-shadow);
}

/* ==========================================================
   Stripe layout
   ========================================================== */

.cookie-consent-overlay.ccbv-layout-stripe {
  position: fixed;
  inset: auto 0 0;
  z-index: 99999;
  display: block;
  padding: 0;
  overflow: visible;
  border-top: 1px solid var(--ccbv-ui-border);
}

.cookie-consent-overlay.ccbv-layout-stripe::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ccbv-backdrop, rgba(0, 0, 0, 0.6));
}

.ccbv-layout-stripe .cookie-manage-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 18px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: start;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.ccbv-layout-stripe .cookie-manage-content p {
  flex: 1;
  min-width: 260px;
  margin: 0;
  line-height: 1.4;
}

.ccbv-layout-stripe .cookie-manage-content h2,
.ccbv-layout-stripe .cookie-manage-content h3 {
  margin: 0 0 6px;
}

/* ==========================================================
   Logo and typography
   ========================================================== */

.ccbv-logo {
  display: block;
  width: auto;
  height: 36px !important;
  margin: 0 auto 12px;
}

.ccbv-layout-stripe .ccbv-logo {
  margin: 0 12px 0 0;
}

#cookie-consent-modal h2,
#cookie-consent-modal h3,
.cookie-manage-content h2,
.cookie-manage-content h3 {
  margin: 0 0 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--ccbv-heading, var(--ccbv-ui-text));
}

#cookie-consent-modal h2,
.cookie-manage-content h2 {
  font-size: 30px !important;
}

#cookie-consent-modal h3,
#cookie-ccbv-preferences h3,
.cookie-manage-content h3 {
  font-size: 24px !important;
}

.cookie-manage-content p {
  margin: 0.5em 0 1.2em;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ccbv-text, var(--ccbv-ui-text));
}

/* ==========================================================
   Banner regular text color
   ========================================================== */

#cookie-consent-modal,
#cookie-consent-modal .cookie-consent-texts,
#cookie-consent-modal .cookie-consent-texts p,
.cookie-consent-overlay .cookie-manage-content,
.cookie-consent-overlay .cookie-manage-content p,
.ccbv-layout-stripe .cookie-consent-texts,
.ccbv-layout-stripe .cookie-consent-texts p,
.ccbv-layout-stripe .ccbv-stripe-msg {
	color: var(--ccbv-text, #1d2327);
}

/* ==========================================================
   Actions and buttons
   ========================================================== */

.cookie-consent-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7em;
  margin-top: 1.2em;
}
.cookie-consent-powered {
    font-size: 12px;
    margin-top: 1.5rem;
    color: #252525;
	text-align: center;
}
.cookie-consent-powered a {
    text-decoration: underline;
    color: var(--ccbv-pbg, #2b84e2);
}
ccbv-close 
.ccbv-layout-stripe .cookie-consent-powered {
	text-align: right;
	margin-top: 1rem;
}
.rtl .ccbv-layout-stripe .cookie-consent-powered {
	text-align: left;
}
.ccbv-layout-stripe .cookie-consent-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.cookie-btn {
  padding: 10px 16px;
  border: 1px solid var(--ccbv-ui-border);
  border-radius: 8px;
  background: var(--ccbv-sbg, #f3f4f6);
  color: var(--ccbv-st, var(--ccbv-ui-text));
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--ccbv-ui-shadow-sm);
}

.cookie-btn:focus-visible {
  outline: none;
  border-color: rgba(46, 3, 140, 0.45);
  box-shadow: var(--ccbv-ui-focus);
}

.cookie-btn.accept {
  border-color: transparent;
  background: var(--ccbv-pbg, var(--ccbv-primary));
  color: var(--ccbv-pt, #ffffff);
  box-shadow: 0 14px 28px rgba(46, 3, 140, 0.22);
}

.cookie-btn.accept:hover {
	background-color: var(--ccbv-pbg, #2271b1);
	filter: brightness(0.94);
}

.ccbv-layout-stripe .cookie-btn {
  padding: 0.55em 1.1em;
}

/* ==========================================================
   Floating cookie-settings button
   ========================================================== */

.ccbv-floating-settings {
  /* Fixed positioning is intentionally explicit to override theme styles. */
  position: fixed !important;
  top: auto !important;
  right: 20px !important;
  bottom: 20px !important;
  left: auto !important;
  z-index: 100001;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 32px;
  margin: 0 !important;
  padding: 10px 10px;

  border: 1px solid var(--ccbv-ui-border);
  border-radius: 999px;
  background: var(--ccbv-ui-bg);
  color: var(--ccbv-ui-text);
  box-shadow: var(--ccbv-ui-shadow-sm);

  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  transform: none;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

.ccbv-floating-settings:hover {
  background: var(--ccbv-ui-bg-2) !important;
  transform: translateY(-2px);
  box-shadow: var(--ccbv-ui-shadow);
  
}

.ccbv-floating-settings:focus-visible {
  outline: none;
  box-shadow: var(--ccbv-ui-shadow-sm), var(--ccbv-ui-focus);
}

/* Keep the control above mobile browser bars and safe-area insets. */
@supports (bottom: env(safe-area-inset-bottom)) {
  .ccbv-floating-settings {
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
}

.ccbv-floating-settings img {
	width: 32px;
	height: auto;
	transition: filter 0.12s ease, opacity 0.12s ease;
}

/*
 * Floating-button icon color variants.
 *
 * Brand:
 * Keep the original colors embedded in datalock-logo.svg.
 *
 * Black:
 * Convert the SVG image to solid black without requiring
 * a second image file.
 */
.ccbv-floating-settings--brand img {
	filter: none;
}

.ccbv-floating-settings--black img {
	filter: brightness(0) saturate(100%);
}
.ccbv-floating-settings--black:hover {
	border-color: #000 !important;
}
/* Floating button tooltip */
.ccbv-floating-settings::before,
.ccbv-floating-settings::after {
	position: absolute;
	left: 50%;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(4px);
	transition:
		opacity 0.16s ease,
		visibility 0.16s ease,
		transform 0.16s ease;
}

/* Tooltip text */
.ccbv-floating-settings::after {
	content: attr(data-tooltip);
	bottom: calc(100% + 10px);
	z-index: 2;

	width: max-content;
	max-width: 220px;
	padding: 7px 10px;

	border-radius: 7px;
	background: #0f172a;
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);

	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
}

/* Tooltip arrow */
.ccbv-floating-settings::before {
	content: "";
	bottom: calc(100% + 4px);
	z-index: 3;

	width: 0;
	height: 0;

	border-top: 6px solid #0f172a;
	border-right: 6px solid transparent;
	border-left: 6px solid transparent;
}

/* Show on mouse hover and keyboard focus */
.ccbv-floating-settings:hover::before,
.ccbv-floating-settings:hover::after,
.ccbv-floating-settings:focus-visible::before,
.ccbv-floating-settings:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   Preferences dialog
   ========================================================== */

#cookie-ccbv-preferences {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--ccbv-backdrop, rgba(0, 0, 0, 0.6));
}

#cookie-ccbv-preferences .ccbv-preferences-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  padding: 2rem 2rem 1rem 2rem;
  overflow: auto;
  background: var(--ccbv-bg, var(--ccbv-ui-bg));
  color: var(--ccbv-text, var(--ccbv-ui-text));
  border: 1px solid var(--ccbv-ui-border);
  border-radius: var(--ccbv-ui-radius);
  box-shadow: var(--ccbv-ui-shadow);
}

.ccbv-pref-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.ccbv-pref-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--ccbv-ui-border);
  border-radius: var(--ccbv-ui-radius-sm);
  background: var(--ccbv-ui-bg-2);
}

.ccbv-pref-item strong {
  color: var(--ccbv-ui-text);
}

.ccbv-pref-item small {
  grid-column: 2 / -1;
  color: var(--ccbv-ui-muted);
}

#cookie-ccbv-preferences input[type="checkbox"] {
  accent-color: var(--ccbv-primary);
}

.ccbv-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  padding: 3px 0 0 0;
  border: 1px solid var(--ccbv-ui-border);
  border-radius: 2rem;
  background: var(--ccbv-ui-bg);
  /*color: var(--ccbv-ui-text);*/
  font-size: 1.5rem !important;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.12s ease;
	
  color: var(--ccbv-pbg, var(--ccbv-ui-text)) !important;
  border-color: var(--ccbv-pbg, var(--ccbv-ui-border));
}

.ccbv-close:hover {
  /*transform: translateY(-1px);*/
  color: var(--ccbv-ui-text) !important;
  background: var(--ccbv-ui-bg) !important;
  border-color: var(--ccbv-ui-text) !important;
}

.ccbv-close:focus-visible {
  outline: none;
  box-shadow: var(--ccbv-ui-focus);
}

/* ==========================================================
   Optional frontend policy table
   ========================================================== */

.ccbv-policy-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.ccbv-policy-wrapper th,
.ccbv-policy-wrapper td {
  padding: 8px;
  border: 1px solid #dcdcde;
  vertical-align: top;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 720px) {
  .cookie-manage-content {
    padding: 1.4rem;
  }

  .ccbv-layout-stripe .cookie-manage-content {
    flex-direction: column;
    align-items: stretch;
  }

  .ccbv-layout-stripe .cookie-consent-actions {
    justify-content: center;
  }

  .ccbv-layout-stripe .cookie-manage-content p {
    min-width: 0;
    text-align: center;
  }

  .ccbv-floating-settings {
    right: 12px !important;
    bottom: 12px !important;
    min-height: 40px;
    padding: 9px 9px;
    font-size: 13px;
  }

  @supports (bottom: env(safe-area-inset-bottom)) {
    .ccbv-floating-settings {
      bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
  }
}

/* WordPress admin bar: the button remains anchored to the viewport bottom. */
body.admin-bar .ccbv-floating-settings {
  position: fixed !important;
}

.dl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================
   Consent banner button hardening
   Prevent themes and page builders from overriding saved colors
   ========================================================== */

#cookie-consent-overlay .cookie-btn {
	-webkit-appearance: none !important;
	appearance: none !important;

	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;

	min-height: 40px;
	padding: 10px 16px !important;

	border-width: 1px !important;
	border-style: solid !important;
	border-radius: 8px !important;

	font-family: inherit !important;
	font-size: 0.95em !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.01em !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	text-indent: 0 !important;

	opacity: 1 !important;
	visibility: visible !important;

	background-image: none !important;
	text-shadow: none !important;

	-webkit-text-fill-color: currentColor !important;
}

/* Accept All */
#cookie-consent-overlay .cookie-btn.accept {
	background-color: var(--ccbv-pbg, #2271b1) !important;
	color: var(--ccbv-pt, #ffffff) !important;
	border-color: transparent !important;

	-webkit-text-fill-color: var(--ccbv-pt, #ffffff) !important;
}

/* Reject, Manage, Back, and other secondary actions */
#cookie-consent-overlay .cookie-btn.reject,
#cookie-consent-overlay .cookie-btn.manage,
#cookie-consent-overlay .cookie-btn.back,
#cookie-consent-overlay .ccbv-preferences .cookie-btn {
	background-color: var(--ccbv-sbg, #f3f4f6) !important;
	color: var(--ccbv-st, #1d2327) !important;
	border-color: var(--ccbv-ui-border, rgba(15, 23, 42, 0.12)) !important;

	-webkit-text-fill-color: var(--ccbv-st, #1d2327) !important;
}

/* Preserve configured colors on hover */
#cookie-consent-overlay .cookie-btn.accept:hover,
#cookie-consent-overlay .cookie-btn.accept:focus {
	background-color: var(--ccbv-pbg, #2271b1) !important;
	color: var(--ccbv-pt, #ffffff) !important;
	-webkit-text-fill-color: var(--ccbv-pt, #ffffff) !important;
	filter: brightness(0.94);
}

#cookie-consent-overlay .cookie-btn.reject:hover,
#cookie-consent-overlay .cookie-btn.reject:focus,
#cookie-consent-overlay .cookie-btn.manage:hover,
#cookie-consent-overlay .cookie-btn.manage:focus,
#cookie-consent-overlay .cookie-btn.back:hover,
#cookie-consent-overlay .cookie-btn.back:focus,
#cookie-consent-overlay .ccbv-preferences .cookie-btn:hover,
#cookie-consent-overlay .ccbv-preferences .cookie-btn:focus {
	background-color: var(--ccbv-sbg, #f3f4f6) !important;
	color: var(--ccbv-st, #1d2327) !important;
	-webkit-text-fill-color: var(--ccbv-st, #1d2327) !important;
	filter: brightness(0.97);
}
/* ==========================================================
   Preferences dialog accessibility enhancements
   ========================================================== */

/* Prevent page scrolling while the preferences dialog is open. */
html.ccbv-preferences-open,
body.ccbv-preferences-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/*
 * Keep the actual optional checkboxes visible and keyboard-focusable,
 * even when a theme or page builder applies custom checkbox styles.
 */
#cookie-ccbv-preferences .cookie-toggle {
  display: inline-block !important;
  position: static !important;

  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;

  margin: 1px 0 0 !important;
  padding: 0 !important;

  opacity: 1 !important;
  visibility: visible !important;

  clip: auto !important;
  clip-path: none !important;

  transform: none !important;
  pointer-events: auto !important;

  -webkit-appearance: checkbox;
  appearance: auto;
  accent-color: var(--ccbv-primary, #2e038c);
}

/* Necessary remains visible but intentionally outside the tab order. */
#cookie-ccbv-preferences input[type="checkbox"]:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed;
}

/* Strong keyboard focus indicator for all dialog controls. */
#cookie-ccbv-preferences :is(
  button,
  a[href],
  input[type="checkbox"]
):focus-visible,
#ccbv-pref-title:focus-visible {
  outline: 3px solid var(--ccbv-primary, #2e038c) !important;
  outline-offset: 3px !important;
  box-shadow: var(
    --ccbv-ui-focus,
    0 0 0 3px rgba(46, 3, 140, 0.20)
  );
}

/*
 * Highlight the complete preference row while its checkbox has focus.
 * This makes Analytics, Marketing, and Functional easy to identify
 * during keyboard navigation.
 */
#cookie-ccbv-preferences .ccbv-pref-item {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

#cookie-ccbv-preferences .ccbv-pref-item:focus-within {
  border-color: var(--ccbv-primary, #2e038c) !important;
  background: var(--ccbv-ui-bg, #ffffff) !important;
  box-shadow: var(
    --ccbv-ui-focus,
    0 0 0 3px rgba(46, 3, 140, 0.20)
  ) !important;
}

#cookie-ccbv-preferences .ccbv-pref-item:focus-within strong {
  color: var(--ccbv-primary, #2e038c);
}

/* The heading receives programmatic focus only when the dialog opens. */
#ccbv-pref-title[tabindex="-1"] {
  scroll-margin-top: 24px;
}

/* =========================================================
   Main consent-modal heading focus
   ========================================================= */

/*
 * The centered consent modal moves focus to its heading when it appears.
 * Use :focus and the JavaScript-applied class because programmatic focus
 * is not always represented by :focus-visible in every browser.
 */
#cookie-consent-modal #ccbv-consent-title:focus,
#cookie-consent-modal #ccbv-consent-title.ccbv-consent-title--focused {
  outline: hidden !important;
  border: none;
  box-shadow: none !important;
}

/* Programmatic focus only; the heading is not added to normal tab order. */
#cookie-consent-modal #ccbv-consent-title[tabindex="-1"] {
  scroll-margin-block: 32px;
}

/* =========================================================
   Floating cookie-settings button placement
   ========================================================= */

/*
 * These are physical left/right positions, independent of the document's
 * RTL or LTR direction. The existing bottom offset remains unchanged.
 */
.ccbv-floating-settings.ccbv-floating-settings--right {
	right: 20px !important;
	left: auto !important;
}

.ccbv-floating-settings.ccbv-floating-settings--left {
	right: auto !important;
	left: 20px !important;
}

@media (max-width: 720px) {
	.ccbv-floating-settings.ccbv-floating-settings--right {
		right: 12px !important;
		left: auto !important;
	}

	.ccbv-floating-settings.ccbv-floating-settings--left {
		right: auto !important;
		left: 12px !important;
	}
}


/* ==========================================================
   Privacy Policy links
   ========================================================== */
#cookie-consent-modal .ccbv-privacy-policy-link,
#cookie-ccbv-preferences .ccbv-privacy-policy-link {
	margin: -.35rem 0 .75rem;
	font-size: .88rem;
	line-height: 1.4;
	text-align: center;
}

#cookie-consent-modal .ccbv-privacy-policy-link a,
#cookie-ccbv-preferences .ccbv-privacy-policy-link a {
	color: var(--ccbv-pbg, var(--ccbv-primary, #2e038c));
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#cookie-consent-modal .ccbv-privacy-policy-link a:hover,
#cookie-ccbv-preferences .ccbv-privacy-policy-link a:hover {
	text-decoration-thickness: 2px;
}

#cookie-consent-modal .ccbv-privacy-policy-link a:focus-visible,
#cookie-ccbv-preferences .ccbv-privacy-policy-link a:focus-visible {
	outline: 3px solid var(--ccbv-primary, #2e038c);
	outline-offset: 3px;
	border-radius: 4px;
}

.ccbv-layout-stripe .ccbv-privacy-policy-link {
	margin: 5px 0 0 !important;
	text-align: start !important;
}

#cookie-ccbv-preferences .ccbv-preferences-policy {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--ccbv-ui-border);
}


/* Keep the policy link compact inside the bottom stripe. */
.ccbv-layout-stripe .cookie-manage-content .ccbv-privacy-policy-link {
	flex: none !important;
	min-width: 0 !important;
	width: auto;
}
