.narrix-consent-panel {
  position: fixed;
  z-index: 5000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  width: min(980px, calc(100% - 36px));
  padding: 20px 22px;
  color: #f1f5fb;
  background: rgba(5, 9, 14, 0.97);
  border: 1px solid rgba(53, 133, 224, 0.42);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate3d(-50%, 16px, 0);
  transition: opacity 180ms ease, transform 220ms ease;
}

.narrix-consent-panel[hidden],
.narrix-consent-panel [hidden] {
  display: none;
}

.narrix-consent-panel.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.narrix-consent-copy {
  margin-bottom: 16px;
}

.narrix-consent-copy h2 {
  margin: 0 0 7px;
  color: #fff;
  font: 700 clamp(1rem, 1.7vw, 1.18rem)/1.2 "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.narrix-consent-copy p {
  margin: 0;
  max-width: 820px;
  color: rgba(233, 239, 247, 0.76);
  font: 400 0.82rem/1.55 "Manrope", system-ui, sans-serif;
}

.narrix-consent-copy a {
  color: #5ea5f5;
  text-decoration: none;
  white-space: nowrap;
}

.narrix-consent-copy a:hover,
.narrix-consent-copy a:focus-visible {
  text-decoration: underline;
}

.narrix-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, auto));
  justify-content: end;
  gap: 10px;
}

.narrix-consent-actions--details {
  grid-template-columns: repeat(2, minmax(138px, auto));
  margin-top: 16px;
}

.narrix-consent-button {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 999px;
  font: 700 0.7rem/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.narrix-consent-button:hover {
  transform: translateY(-1px);
}

.narrix-consent-button:focus-visible,
.narrix-consent-settings-link:focus-visible,
.narrix-consent-category:focus-within {
  outline: 2px solid #6cb1ff;
  outline-offset: 3px;
}

.narrix-consent-button--primary {
  color: #fff;
  background: #2374cc;
  border: 1px solid #3389e8;
}

.narrix-consent-button--primary:hover {
  background: #2f83dc;
}

.narrix-consent-button--secondary {
  color: rgba(242, 247, 253, 0.86);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.narrix-consent-button--secondary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.narrix-consent-details {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 15px;
}

.narrix-consent-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.narrix-consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  padding: 14px 15px;
  color: #eef4fb;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

label.narrix-consent-category {
  cursor: pointer;
}

.narrix-consent-category strong,
.narrix-consent-category span {
  display: block;
}

.narrix-consent-category strong {
  margin-bottom: 4px;
  font: 700 0.78rem/1.2 "Manrope", system-ui, sans-serif;
}

.narrix-consent-category span {
  color: rgba(233, 239, 247, 0.64);
  font: 400 0.68rem/1.45 "Manrope", system-ui, sans-serif;
}

.narrix-consent-category input[type="checkbox"] {
  width: 42px;
  height: 23px;
  margin: 0;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.narrix-consent-category input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  transition: transform 160ms ease, background 160ms ease;
}

.narrix-consent-category input[type="checkbox"]:checked {
  background: #2374cc;
  border-color: #3389e8;
}

.narrix-consent-category input[type="checkbox"]:checked::after {
  transform: translateX(19px);
  background: #fff;
}

.narrix-consent-always {
  flex: 0 0 auto;
  color: rgba(106, 179, 255, 0.88) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.narrix-consent-settings-link {
  display: inline;
  margin: 0;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.78;
  cursor: pointer;
}

.narrix-consent-settings-link:hover {
  opacity: 1;
}

.narrix-consent-settings-link--offer {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.58);
  font: 600 0.62rem/1.4 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.narrix-consent-settings-link--policy {
  display: block;
  margin: 14px auto 0;
  color: currentColor;
  font-size: 0.78rem;
  text-align: center;
}

.narrix-consent-settings-link--floating {
  position: fixed;
  z-index: 1300;
  left: 14px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding: 7px 10px;
  color: rgba(235, 242, 250, 0.7);
  background: rgba(5, 9, 14, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font: 600 0.62rem/1 "Manrope", system-ui, sans-serif;
  text-decoration: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (max-width: 820px) {
  .narrix-consent-categories {
    grid-template-columns: 1fr;
  }

  .narrix-consent-category {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .narrix-consent-panel {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 18px;
    border-radius: 16px;
  }

  .narrix-consent-copy p {
    font-size: 0.78rem;
  }

  .narrix-consent-actions {
    grid-template-columns: 1fr 1fr;
  }

  .narrix-consent-actions > .narrix-consent-button--primary {
    grid-column: 1 / -1;
  }

  .narrix-consent-actions--details {
    grid-template-columns: 1fr 1fr;
  }

  .narrix-consent-actions--details > .narrix-consent-button--primary {
    grid-column: auto;
  }

  .narrix-consent-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .narrix-consent-settings-link--offer {
    bottom: 42px;
  }
}

@media (max-width: 430px) {
  .narrix-consent-actions,
  .narrix-consent-actions--details {
    grid-template-columns: 1fr;
  }

  .narrix-consent-actions > .narrix-consent-button--primary,
  .narrix-consent-actions--details > .narrix-consent-button--primary {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .narrix-consent-panel,
  .narrix-consent-button,
  .narrix-consent-category input[type="checkbox"],
  .narrix-consent-category input[type="checkbox"]::after {
    transition: none;
  }
}
