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

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.cookie-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 29, .58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cookie-consent__dialog {
  position: relative;
  width: min(100%, 500px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: 44px 42px 38px;
  border: 1px solid rgba(15, 27, 45, .08);
  border-radius: 28px;
  background: #fff;
  color: var(--color-text, #0f1b2d);
  box-shadow: 0 28px 90px rgba(8, 16, 29, .28);
  text-align: center;
  isolation: isolate;
  animation: cookie-consent-in .36s cubic-bezier(.2, .8, .2, 1) both;
}

.cookie-consent__accent {
  position: absolute;
  z-index: -1;
  top: -92px;
  left: -96px;
  width: 250px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 65%, rgba(167, 23, 56, .28), rgba(167, 23, 56, .08) 58%, transparent 59%);
  pointer-events: none;
}

.cookie-consent__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted, #68788e);
  font: inherit;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.cookie-consent__close:hover {
  background: var(--color-surface-soft, #f5f7fa);
  color: var(--color-text, #0f1b2d);
}

.cookie-consent__icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin: 4px auto 24px;
  border-radius: 26px;
  background: var(--color-primary-soft, rgba(167, 23, 56, .1));
  color: var(--color-primary, #a71738);
}

.cookie-consent__icon svg {
  width: 54px;
  height: 54px;
  display: block;
  overflow: visible;
  fill: currentColor;
}

.cookie-consent__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cookie-consent__dialog h2 {
  margin: 0 0 14px;
  color: var(--color-text, #0f1b2d);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.cookie-consent__dialog p {
  max-width: 390px;
  margin: 0 auto 8px;
  color: var(--color-text-body, #526176);
  font-size: 1rem;
  line-height: 1.58;
}

.cookie-consent__learn {
  display: inline-flex;
  margin: 0 auto 28px;
  color: var(--color-text, #0f1b2d);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  display: grid;
  gap: 12px;
}

.cookie-consent__actions button {
  width: 100%;
  min-height: 54px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.cookie-consent__actions button:hover {
  transform: translateY(-1px);
}

.cookie-consent__accept {
  border: 1px solid var(--color-primary, #a71738);
  background: var(--color-primary, #a71738);
  color: #fff;
}

.cookie-consent__accept:hover {
  border-color: var(--color-primary-hover, #86122d);
  background: var(--color-primary-hover, #86122d);
}

.cookie-consent__reject {
  border: 1.5px solid rgba(15, 27, 45, .42);
  background: #fff;
  color: var(--color-text, #0f1b2d);
}

.cookie-consent__reject:hover {
  border-color: var(--color-text, #0f1b2d);
  background: var(--color-surface-soft, #f5f7fa);
}

body.cookie-consent-open {
  overflow: hidden;
}

@keyframes cookie-consent-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .cookie-consent {
    align-items: end;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  }

  .cookie-consent__dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 36px 22px 24px;
    border-radius: 26px;
  }

  .cookie-consent__close {
    top: 10px;
    right: 10px;
  }

  .cookie-consent__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 22px;
  }

  .cookie-consent__icon svg {
    width: 46px;
    height: 46px;
  }

  .cookie-consent__dialog p {
    font-size: .94rem;
  }

  .cookie-consent__learn {
    margin-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__dialog {
    animation: none;
  }

  .cookie-consent__actions button {
    transition: none;
  }
}
