:root {
  --nf-consent-primary: var(--nf-primary, #0d5390);
  --nf-consent-dark: var(--nf-primary-dark, #082f52);
  --nf-consent-ink: var(--nf-ink, #10263a);
  --nf-consent-muted: var(--nf-muted, #617184);
  --nf-consent-border: var(--nf-border, #dce7ef);
  --nf-consent-surface: var(--nf-surface, #f4f9fc);
}

.nf-consent,
.nf-consent * {
  box-sizing: border-box;
}

.nf-consent[hidden],
.nf-consent [hidden] {
  display: none !important;
}

.nf-consent {
  position: relative;
  z-index: 2147483000;
  color: var(--nf-consent-ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.nf-consent__banner {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  width: min(100% - 28px, 1020px);
  min-height: 72px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(13, 83, 144, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 55px rgba(8, 47, 82, 0.2);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(14px);
}

.nf-consent--visible .nf-consent__banner {
  opacity: 1;
  transform: translateY(0);
}

.nf-consent__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--nf-consent-primary);
  background: var(--nf-consent-surface);
}

.nf-consent__icon svg,
.nf-consent__reopen svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nf-consent__copy {
  min-width: 0;
}

.nf-consent__copy strong {
  display: block;
  margin-bottom: 3px;
  color: var(--nf-consent-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.nf-consent__copy p {
  margin: 0;
  color: var(--nf-consent-muted);
  font-size: 10.5px;
  line-height: 1.48;
}

.nf-consent__copy a,
.nf-consent__dialog a {
  color: var(--nf-consent-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nf-consent__actions,
.nf-consent__dialog-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nf-consent__button {
  min-height: 38px;
  margin: 0 !important;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 36px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nf-consent__button:hover {
  transform: translateY(-1px);
}

.nf-consent__button--primary {
  border-color: var(--nf-consent-primary);
  color: #fff;
  background: var(--nf-consent-primary);
}

.nf-consent__button--outline {
  border-color: var(--nf-consent-border);
  color: var(--nf-consent-primary);
  background: #fff;
}

.nf-consent__button--text {
  color: var(--nf-consent-muted);
  background: transparent;
}

.nf-consent__backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 24, 40, 0.64);
  opacity: 0;
  transition: opacity 160ms ease;
  backdrop-filter: blur(4px);
}

.nf-consent__backdrop.is-open {
  opacity: 1;
}

.nf-consent__dialog {
  width: min(100%, 570px);
  max-height: min(720px, calc(100vh - 36px));
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  transform: translateY(10px) scale(0.985);
  transition: transform 160ms ease;
}

.nf-consent__backdrop.is-open .nf-consent__dialog {
  transform: translateY(0) scale(1);
}

.nf-consent__dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.nf-consent__dialog-header span {
  display: block;
  margin-bottom: 4px;
  color: var(--nf-consent-primary);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nf-consent__dialog-header h2 {
  margin: 0;
  color: var(--nf-consent-ink);
  font-size: 24px;
  line-height: 1.15;
}

.nf-consent__close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--nf-consent-border);
  border-radius: 999px;
  color: var(--nf-consent-muted);
  background: #fff;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.nf-consent__dialog-intro {
  margin: 13px 0 20px;
  color: var(--nf-consent-muted);
  font-size: 12px;
  line-height: 1.55;
}

.nf-consent__categories {
  display: grid;
  gap: 9px;
}

.nf-consent__category {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid var(--nf-consent-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.nf-consent__category:first-child {
  background: var(--nf-consent-surface);
  cursor: default;
}

.nf-consent__category strong {
  display: block;
  margin-bottom: 3px;
  color: var(--nf-consent-ink);
  font-size: 12px;
  line-height: 1.3;
}

.nf-consent__category p {
  margin: 0;
  color: var(--nf-consent-muted);
  font-size: 10px;
  line-height: 1.45;
}

.nf-consent__always {
  flex: 0 0 auto;
  color: #16806d;
  font-size: 9px;
  font-weight: 800;
}

.nf-consent__switch {
  position: relative;
  display: block;
  width: 43px;
  height: 25px;
  flex: 0 0 43px;
}

.nf-consent__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.nf-consent__switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5dd;
  transition: background 150ms ease;
}

.nf-consent__switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(8, 47, 82, 0.18);
  content: "";
  transition: transform 150ms ease;
}

.nf-consent__switch input:checked + span {
  background: var(--nf-consent-primary);
}

.nf-consent__switch input:checked + span::after {
  transform: translateX(18px);
}

.nf-consent__switch input:focus-visible + span {
  outline: 3px solid rgba(13, 83, 144, 0.18);
  outline-offset: 2px;
}

.nf-consent__dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

.nf-consent__dialog-actions > a {
  margin-right: auto;
  font-size: 10px;
}

.nf-consent__reopen {
  position: fixed;
  bottom: 14px;
  left: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(13, 83, 144, 0.2);
  border-radius: 999px;
  color: var(--nf-consent-primary);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 25px rgba(8, 47, 82, 0.16);
  cursor: pointer;
}

.nf-consent-dialog-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .nf-consent__banner {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: calc(100% - 16px);
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px 10px;
    padding: 10px;
    border-radius: 14px;
  }

  .nf-consent__icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .nf-consent__copy strong {
    font-size: 11px;
  }

  .nf-consent__copy p {
    font-size: 9px;
    line-height: 1.4;
  }

  .nf-consent__actions {
    grid-column: 1 / 3;
    justify-content: flex-end;
  }

  .nf-consent__button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 8px;
    line-height: 32px;
  }

  .nf-consent__dialog {
    padding: 20px 17px;
    border-radius: 18px;
  }

  .nf-consent__dialog-header h2 {
    font-size: 21px;
  }

  .nf-consent__category {
    min-height: 73px;
    padding: 12px;
  }

  .nf-consent__dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nf-consent__dialog-actions > a {
    grid-column: 1 / 3;
    margin: 0 0 3px;
    text-align: center;
  }

  .nf-consent__reopen {
    bottom: 9px;
    left: 9px;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 390px) {
  .nf-consent__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nf-consent__actions .nf-consent__button {
    width: 100%;
    padding: 0 4px;
    font-size: 7.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-consent__banner,
  .nf-consent__backdrop,
  .nf-consent__dialog,
  .nf-consent__button,
  .nf-consent__switch span,
  .nf-consent__switch span::after {
    transition: none !important;
  }
}
