/* ============================================================
   GDPR / CMP Consent Banner — Styles
   ============================================================ */

:root {
  --gdpr-bg: #ffffff;
  --gdpr-text: #1f2937;
  --gdpr-muted: #6b7280;
  --gdpr-border: #e5e7eb;
  --gdpr-primary: #0ea5e9;
  --gdpr-primary-text: #ffffff;
  --gdpr-ghost: #f3f4f6;
  --gdpr-ghost-text: #1f2937;
  --gdpr-accent: #2563eb;
  --gdpr-radius: 12px;
  --gdpr-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  --gdpr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Very high z-index so the banner sits above ads and everything else */
  --gdpr-z-banner: 2147483000;
  --gdpr-z-float: 2147483001;
  --gdpr-z-modal: 2147483646;
}

/* ---------- Banner ---------- */
.gdpr-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--gdpr-z-banner);
  font-family: var(--gdpr-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--gdpr-text);
  background: var(--gdpr-bg);
  border-top: 1px solid var(--gdpr-border);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  padding: 16px;
  box-sizing: border-box;
}

.gdpr-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.gdpr-banner__content {
  flex: 1 1 320px;
  min-width: 260px;
}

.gdpr-banner__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.gdpr-banner__text {
  margin: 0;
  color: var(--gdpr-muted);
  font-size: 13px;
}

.gdpr-banner__text a,
.gdpr-modal__intro a {
  color: var(--gdpr-accent);
  text-decoration: underline;
}

.gdpr-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Buttons ---------- */
.gdpr-btn {
  font-family: var(--gdpr-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.gdpr-btn--primary {
  background: var(--gdpr-primary);
  color: var(--gdpr-primary-text);
}

.gdpr-btn--primary:hover {
  background: #0284c7;
  opacity: 0.95;
}

.gdpr-btn--ghost {
  background: var(--gdpr-ghost);
  color: var(--gdpr-ghost-text);
  border-color: var(--gdpr-border);
}

.gdpr-btn--ghost:hover {
  background: #e5e7eb;
}

/* ---------- Modal ---------- */
.gdpr-modal {
  position: fixed;
  inset: 0;
  z-index: var(--gdpr-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gdpr-modal[hidden] {
  display: none;
}

.gdpr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.gdpr-modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--gdpr-bg);
  color: var(--gdpr-text);
  border-radius: var(--gdpr-radius);
  box-shadow: var(--gdpr-shadow);
  padding: 24px;
  font-family: var(--gdpr-font);
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}

.gdpr-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gdpr-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.gdpr-modal__close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--gdpr-muted);
  cursor: pointer;
  padding: 0 4px;
}

.gdpr-modal__close:hover {
  color: var(--gdpr-text);
}

.gdpr-modal__intro {
  margin: 0 0 16px;
  color: var(--gdpr-muted);
  font-size: 13px;
}

.gdpr-modal__options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.gdpr-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gdpr-border);
}

.gdpr-option:last-child {
  border-bottom: none;
}

.gdpr-option__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gdpr-option__text strong {
  font-size: 14px;
}

.gdpr-option__text span {
  font-size: 12.5px;
  color: var(--gdpr-muted);
}

.gdpr-modal__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Toggle switch ---------- */
.gdpr-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.gdpr-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gdpr-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 26px;
  transition: background 0.2s ease;
}

.gdpr-switch__slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gdpr-switch input:checked + .gdpr-switch__slider {
  background: var(--gdpr-accent);
}

.gdpr-switch input:checked + .gdpr-switch__slider::before {
  transform: translateX(20px);
}

.gdpr-switch input:disabled + .gdpr-switch__slider {
  cursor: not-allowed;
  background: #9ca3af;
}

.gdpr-switch input:focus-visible + .gdpr-switch__slider {
  outline: 2px solid var(--gdpr-accent);
  outline-offset: 2px;
}

/* ---------- Floating reopen button ---------- */
.gdpr-float {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: var(--gdpr-z-float);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--gdpr-border);
  background: var(--gdpr-bg);
  color: var(--gdpr-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.gdpr-float:hover {
  background: var(--gdpr-ghost);
  transform: translateY(-2px);
}

.gdpr-float--hidden {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .gdpr-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .gdpr-banner__actions {
    width: 100%;
  }

  .gdpr-banner__actions .gdpr-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
