/**
 * GDPR Consent Widget — styles.
 * All colors/sizing live in CSS custom properties under .gdpr-c-root, scoped
 * so they never leak into (or get overridden by) the host page's own :root.
 * Override any of these from the host site's own stylesheet, e.g.:
 *
 *   .gdpr-c-root { --gdpr-accent: #1f4a2a; --gdpr-radius: 10px; }
 */

.gdpr-c-root {
  --gdpr-accent: #7c4dff;
  --gdpr-accent-text: #ffffff;
  --gdpr-bg: #ffffff;
  --gdpr-text: #2a2a2a;
  --gdpr-text-dim: #6b6b6b;
  --gdpr-border: #e6e6e6;
  --gdpr-radius: 12px;
  --gdpr-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gdpr-max-width: 880px;
  --gdpr-z: 2147483000;
}

.gdpr-c-root * { box-sizing: border-box; }

/* Backdrop dims the page but the panel itself sits bottom-anchored, not a
   full centered modal — a deliberately different layout from a big centered
   dialog with a right-hand button rail. */
.gdpr-c-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.45);
  z-index: var(--gdpr-z);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  font-family: var(--gdpr-font);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gdpr-c-backdrop.gdpr-c-open { opacity: 1; }

.gdpr-c-panel {
  width: 100%;
  max-width: var(--gdpr-max-width);
  background: var(--gdpr-bg);
  color: var(--gdpr-text);
  border-radius: var(--gdpr-radius) var(--gdpr-radius) 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  padding: 28px 30px 22px;
  margin: 0 16px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.gdpr-c-backdrop.gdpr-c-open .gdpr-c-panel { transform: translateY(0); }

@media (min-width: 720px) {
  .gdpr-c-backdrop { align-items: center; }
  .gdpr-c-panel { border-radius: var(--gdpr-radius); margin: 16px; }
}

/* Top links row — footer-style links moved to the TOP of the panel rather
   than the bottom, and the close control sits inline with them instead of
   floating in the corner. */
.gdpr-c-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gdpr-border);
  font-size: 12.5px;
}
.gdpr-c-links { display: flex; gap: 16px; flex-wrap: wrap; }
.gdpr-c-links a { color: var(--gdpr-text-dim); text-decoration: none; }
.gdpr-c-links a:hover { color: var(--gdpr-accent); text-decoration: underline; }
.gdpr-c-brand {
  font-weight: 700;
  color: var(--gdpr-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.gdpr-c-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--gdpr-text-dim);
  padding: 2px 6px;
}
.gdpr-c-close:hover { color: var(--gdpr-text); }

.gdpr-c-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}
.gdpr-c-body {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--gdpr-text-dim);
}
.gdpr-c-body a { color: var(--gdpr-accent); }
.gdpr-c-body p { margin: 0 0 10px; }
.gdpr-c-body p:last-child { margin-bottom: 0; }

/* Category row — horizontal cards, not a plain checklist, and always
   expanded (no separate "show preferences" click needed to see them). */
.gdpr-c-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.gdpr-c-cat {
  border: 1px solid var(--gdpr-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.gdpr-c-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gdpr-c-cat-name {
  font-size: 13px;
  font-weight: 600;
}
.gdpr-c-cat-desc {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--gdpr-text-dim);
}

/* Toggle switch instead of a checkbox — visually distinct from the reference. */
.gdpr-c-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
}
.gdpr-c-switch input { opacity: 0; width: 0; height: 0; }
.gdpr-c-slider {
  position: absolute;
  inset: 0;
  background: #d8d8d8;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gdpr-c-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.gdpr-c-switch input:checked + .gdpr-c-slider { background: var(--gdpr-accent); }
.gdpr-c-switch input:checked + .gdpr-c-slider::before { transform: translateX(14px); }
.gdpr-c-switch input:disabled + .gdpr-c-slider { opacity: 0.55; cursor: not-allowed; }

/* Buttons — a horizontal row along the bottom, not a vertical stack down the
   right edge; "accept all" and "reject non-essential" carry equal visual
   weight (no dark pattern). */
.gdpr-c-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gdpr-c-btn {
  flex: 1 1 160px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s ease, background 0.15s ease;
}
.gdpr-c-btn:hover { filter: brightness(0.94); }
.gdpr-c-btn-solid {
  background: var(--gdpr-accent);
  color: var(--gdpr-accent-text);
}
.gdpr-c-btn-outline {
  background: transparent;
  color: var(--gdpr-accent);
  border-color: var(--gdpr-accent);
}

/* Small floating re-open control, for a "cookie settings" link elsewhere on
   the page to summon (site wires this to GDPRConsent.open()). */
.gdpr-c-relaunch {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: calc(var(--gdpr-z) - 1);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--gdpr-accent);
  color: var(--gdpr-accent-text);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 18px;
  display: none;
}
.gdpr-c-relaunch.gdpr-c-show { display: block; }
