:root {
  --gw-consent-bg: #0d0d10;
  --gw-consent-panel: #17171b;
  --gw-consent-panel-strong: #1c1c21;
  --gw-consent-ink: #f8f8f9;
  --gw-consent-muted: #b7b7c0;
  --gw-consent-line: rgba(255, 255, 255, 0.13);
  /* Minimalnie ciemniejszy wariant marki daje 4.63:1 pod białym tekstem. */
  --gw-consent-red: #eb0000;
  --gw-consent-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gw-consent {
  position: fixed;
  z-index: 99990;
  right: 20px;
  bottom: 20px;
  left: 20px;
  color: var(--gw-consent-ink);
  font-family: Geist, "Geist Fallback", system-ui, sans-serif;
  pointer-events: none;
}

.gw-consent__banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.45fr);
  gap: 34px;
  align-items: center;
  width: min(1120px, 100%);
  margin-inline: auto;
  padding: 24px;
  overflow: hidden;
  color: var(--gw-consent-ink);
  background:
    radial-gradient(68% 150% at 0% 100%, rgba(241, 0, 0, 0.14), transparent 66%),
    var(--gw-consent-bg);
  border: 1px solid var(--gw-consent-line);
  border-radius: 26px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto;
  animation: gw-consent-enter 520ms var(--gw-consent-ease) both;
}

.gw-consent__banner::before {
  position: absolute;
  top: 0;
  right: 38px;
  left: 38px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(241, 0, 0, 0.92), transparent);
  box-shadow: 0 0 22px rgba(241, 0, 0, 0.42);
  pointer-events: none;
}

.gw-consent__content {
  min-width: 0;
  padding: 4px 0 4px 6px;
}

.gw-consent__eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 9px;
  color: #ff3b3b;
  font-size: 10px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: 0.15em;
}

.gw-consent__eyebrow > span {
  width: 7px;
  height: 7px;
  border: 1px solid #ff4b4b;
  border-radius: 2px;
  background: rgba(241, 0, 0, 0.24);
  box-shadow: 0 0 12px rgba(241, 0, 0, 0.45);
  transform: rotate(45deg);
}

.gw-consent__intro h2,
.gw-consent-modal__header h2 {
  max-width: 700px;
  margin: 0;
  color: var(--gw-consent-ink);
  font-family: Unbounded, Outfit, sans-serif;
  font-size: clamp(18px, 1.5vw, 23px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.gw-consent__intro > p:last-child {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--gw-consent-muted);
  font-size: 13px;
  line-height: 1.55;
}

.gw-consent a,
.gw-consent-modal a {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.52);
  text-underline-offset: 3px;
}

.gw-consent__status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 15px;
  color: #d1d1d7;
  font-size: 11px;
  font-weight: 590;
  line-height: 1.4;
}

.gw-consent__status span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.gw-consent__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6d6d76;
}

.gw-consent__status span:first-child i {
  background: #5fd48a;
  box-shadow: 0 0 10px rgba(95, 212, 138, 0.42);
}

.gw-consent__actions {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 19px;
}

.gw-consent__decision {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gw-consent__button,
.gw-consent__settings-link,
.gw-consent-modal__close {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.gw-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  padding: 12px 15px;
  color: #ffffff;
  background: var(--gw-consent-panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  transition:
    transform 220ms var(--gw-consent-ease),
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 220ms ease;
}

.gw-consent__button--primary {
  color: #ffffff;
  background: var(--gw-consent-red);
  border-color: var(--gw-consent-red);
  box-shadow: 0 10px 26px rgba(241, 0, 0, 0.22);
}

.gw-consent__button--reject {
  color: #111114;
  background: #f2f2f4;
  border-color: #f2f2f4;
}

.gw-consent__settings-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  color: #c9c9d0;
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.gw-consent__settings-link span {
  display: inline-block;
  color: #ff3b3b;
  transition: transform 220ms var(--gw-consent-ease);
}

.gw-consent-modal {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--gw-consent-ink);
  font-family: Geist, "Geist Fallback", system-ui, sans-serif;
}

.gw-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.84);
  animation: gw-consent-fade 220ms ease both;
}

.gw-consent-modal__dialog {
  position: relative;
  width: min(700px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  padding: clamp(24px, 4vw, 40px);
  overflow: auto;
  background:
    radial-gradient(74% 48% at 0% 0%, rgba(241, 0, 0, 0.13), transparent 70%),
    var(--gw-consent-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow:
    0 38px 110px rgba(0, 0, 0, 0.62),
    inset 0 1px rgba(255, 255, 255, 0.05);
  animation: gw-consent-modal-enter 400ms var(--gw-consent-ease) both;
}

.gw-consent-modal__dialog::before {
  position: absolute;
  top: 0;
  right: 48px;
  left: 48px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(241, 0, 0, 0.9), transparent);
  pointer-events: none;
}

.gw-consent-modal__header {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  justify-content: space-between;
}

.gw-consent-modal__header h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.gw-consent-modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--gw-consent-line);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  transition:
    transform 220ms var(--gw-consent-ease),
    border-color 180ms ease,
    background-color 180ms ease;
}

.gw-consent-modal__copy {
  max-width: 610px;
  margin: 17px 0 27px;
  color: var(--gw-consent-muted);
  font-size: 14px;
  line-height: 1.6;
}

.gw-consent-modal__choices {
  display: grid;
  gap: 9px;
}

.gw-consent-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 22px;
  align-items: center;
  padding: 19px 20px;
  background: var(--gw-consent-panel);
  border: 1px solid var(--gw-consent-line);
  border-radius: 17px;
  cursor: pointer;
  transition:
    transform 220ms var(--gw-consent-ease),
    border-color 180ms ease,
    background-color 180ms ease;
}

.gw-consent-choice strong,
.gw-consent-choice small {
  display: block;
}

.gw-consent-choice strong {
  color: #ffffff;
  font-size: 14px;
  font-style: normal;
  font-weight: 730;
}

.gw-consent-choice strong em {
  display: inline-block;
  margin-left: 7px;
  padding: 4px 7px;
  color: #bfc0c7;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gw-consent-choice small {
  margin-top: 5px;
  color: #a9a9b3;
  font-size: 12px;
  line-height: 1.48;
}

.gw-consent-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gw-consent-choice i {
  position: relative;
  width: 46px;
  height: 26px;
  background: #34343a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.gw-consent-choice i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 240ms var(--gw-consent-ease);
}

.gw-consent-choice input:checked + i {
  background: var(--gw-consent-red);
  border-color: var(--gw-consent-red);
}

.gw-consent-choice input:checked + i::after {
  transform: translateX(20px);
}

.gw-consent-choice--required {
  cursor: default;
  opacity: 0.78;
}

.gw-consent-choice--required i {
  background: #66666e;
}

.gw-consent-modal__footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 24px;
}

.gw-consent-modal__legal {
  margin: 15px 0 0;
  color: #92929c;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.gw-consent-modal-open {
  overflow: hidden;
}

.gw-consent__button:focus-visible,
.gw-consent__settings-link:focus-visible,
.gw-consent-modal__close:focus-visible,
.gw-consent-choice:has(input:focus-visible) {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .gw-consent__button:hover,
  .gw-consent-modal__close:hover {
    transform: translateY(-2px);
  }

  .gw-consent__button--primary:hover {
    background: #ff1717;
    box-shadow: 0 14px 34px rgba(241, 0, 0, 0.3);
  }

  .gw-consent__button--reject:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.1);
  }

  .gw-consent__button:not(.gw-consent__button--primary, .gw-consent__button--reject):hover,
  .gw-consent-modal__close:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: #232329;
  }

  .gw-consent__settings-link:hover span {
    transform: translateX(3px);
  }

  .gw-consent-choice:not(.gw-consent-choice--required):hover {
    transform: translateX(3px);
    background: #1c1c21;
    border-color: rgba(255, 255, 255, 0.25);
  }
}

@media (max-width: 920px) {
  .gw-consent__banner {
    grid-template-columns: 1fr;
    gap: 20px;
    width: min(760px, 100%);
  }

  .gw-consent__actions {
    padding: 10px;
  }
}

@media (max-width: 620px) {
  .gw-consent {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .gw-consent__banner {
    display: block;
    max-height: calc(100dvh - 16px);
    padding: 21px 18px 18px;
    overflow-y: auto;
    border-radius: 22px;
  }

  .gw-consent__content {
    padding: 0;
  }

  .gw-consent__intro h2 {
    font-size: 18px;
  }

  .gw-consent__intro > p:last-child {
    font-size: 12px;
  }

  .gw-consent__status {
    display: grid;
    gap: 6px;
    margin-top: 13px;
  }

  .gw-consent__actions {
    margin-top: 17px;
    padding: 9px;
  }

  .gw-consent__decision {
    grid-template-columns: 1fr;
  }

  .gw-consent-modal {
    align-items: end;
    padding: 8px;
  }

  .gw-consent-modal__dialog {
    max-height: calc(100dvh - 16px);
    padding: 24px 18px 20px;
    border-radius: 24px;
  }

  .gw-consent-modal__header h2 {
    font-size: 21px;
  }

  .gw-consent-choice {
    gap: 14px;
    padding: 16px;
  }

  .gw-consent-choice strong em {
    display: block;
    width: fit-content;
    margin: 6px 0 0;
  }

  .gw-consent-modal__footer {
    grid-template-columns: 1fr;
  }

  .gw-consent-modal__footer .gw-consent__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gw-consent *,
  .gw-consent-modal * {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@keyframes gw-consent-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes gw-consent-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gw-consent-modal-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}
