/* Juice Consent UI v4.0 — white card, Gucci-inspired, kontoindstillinger toggles */

/* Reject button — emphasise "AFVIS" word in muted red */
.juice-deny-emph {
  color: #b04141;
}

/* Hide Complianz UI (engine still runs) */
#cmplz-cookiebanner-container,
.cmplz-cookiebanner,
.cmplz-banner,
#cmplz-manage-consent {
  display: none !important;
}

/* ── Overlay ── */
.juice-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s .3s;
}
.juice-consent-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s ease, visibility 0s 0s;
}

/* ── Modal card ── */
.juice-consent-modal {
  position: fixed;
  left: 50%;
  top: 35%;
  transform: translate(-50%, -50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;

  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);

  background: #fff;
  border-radius: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);

  z-index: 99999;
  overflow: hidden;

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #000;

  transition: transform .3s cubic-bezier(.4, 0, .2, 1),
              opacity .3s cubic-bezier(.4, 0, .2, 1),
              visibility 0s .3s;
}
.juice-consent-modal.is-visible {
  transform: translate(-50%, -50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1),
              opacity .3s cubic-bezier(.4, 0, .2, 1),
              visibility 0s 0s;
}

/* ── Header ── */
.juice-consent-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 28px 0;
}

/* ── Title ── */
.juice-consent-title {
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  font-size: 14px;
  color: #000;
  margin: 0;
  line-height: 1.2;
}

/* ── Close button (top-right) ── */
.juice-consent-close {
  border: 0;
  background: transparent;
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.juice-consent-close:hover {
  opacity: 0.5;
}

/* ── Body ── */
.juice-consent-body {
  padding: 14px 28px 8px;
  max-height: min(56vh, 560px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
.juice-consent-body::-webkit-scrollbar { width: 8px; }
.juice-consent-body::-webkit-scrollbar-track { background: transparent; }
.juice-consent-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ── Message text ── */
.juice-consent-message {
  text-align: left;
  margin: 0;
  line-height: 1.65;
  font-size: 11px;
  font-weight: 400;
  color: #000;
}
.juice-consent-message--policy {
  margin: 12px 0 0;
  font-size: 11px;
  color: #000;
}

/* ── Policy link ── */
.juice-consent-link {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.juice-consent-link:hover {
  color: rgba(0, 0, 0, 0.6);
}

/* ── Actions ── */
.juice-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 20px 28px 28px;
}

/* ── Buttons ── */

/* ── Buttons — all plain text, no boxes ── */
.juice-btn {
  border: none;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity .2s ease;
}
.juice-btn:hover {
  opacity: 0.5;
}

.juice-btn-primary {
  /* no special styling — plain text like ghost */
}

.juice-btn-ghost {
  font-weight: 400;
}

/* ── Preference rows ── */
.juice-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.juice-pref-row:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.juice-pref-left {
  min-width: 0;
  flex: 1;
}

.juice-pref-name {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: #000;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.juice-pref-desc {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  color: #000;
}

.juice-pref-right {
  flex: 0 0 auto;
}

.juice-pref-fixed {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: #000;
  white-space: nowrap;
}

/* ── Toggle switch — kontoindstillinger pattern ── */
.juice-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.juice-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.juice-switch-ui {
  position: relative;
  width: 32px;
  height: 16px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.15);
  transition: background 300ms ease;
}
.juice-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 300ms ease;
}
.juice-switch input:checked + .juice-switch-ui {
  background: #000;
}
.juice-switch input:checked + .juice-switch-ui::after {
  transform: translateX(16px);
  box-shadow: none;
}

/* ── Mobile ── */
@media (max-width: 520px) {
  .juice-consent-modal {
    width: calc(100vw - 24px);
    top: 50%;
  }
  .juice-consent-header {
    padding: 22px 20px 0;
  }
  .juice-consent-body {
    padding: 12px 20px 8px;
  }
  .juice-consent-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px 20px 22px;
  }
  .juice-btn-primary {
    text-align: center;
  }
  .juice-btn-ghost {
    text-align: center;
    padding: 8px 0;
  }
}
