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

.cookie-consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1400;
  padding: 1.15rem;
  pointer-events: none;
}

.cookie-consent__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1.35rem, 2.6vw, 2.2rem);
  overflow: hidden;
  border: 1px solid rgba(208, 163, 109, 0.3);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 0%, rgba(185, 138, 85, 0.14), transparent 20rem),
    rgba(12, 13, 11, 0.97);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  color: #f2ede5;
  pointer-events: auto;
  backdrop-filter: blur(20px);
}

.cookie-consent__copy {
  max-width: 720px;
}

.cookie-consent__eyebrow {
  display: block;
  margin-bottom: 0.55rem;
  color: #d0a36d;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.cookie-consent h2,
.cookie-preferences h2 {
  margin: 0 0 0.65rem;
  color: #f2ede5;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.cookie-consent p,
.cookie-preferences p {
  margin: 0;
  color: rgba(242, 237, 229, 0.7);
  font-size: 0.9rem;
  line-height: 1.65;
}

.cookie-consent__copy > a {
  display: inline-block;
  margin-top: 0.7rem;
  color: #d0a36d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-consent__actions,
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;
}

.cookie-button {
  min-height: 46px;
  padding: 0.85rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

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

.cookie-button:focus-visible,
.cookie-preferences__close:focus-visible,
.cookie-preference-row--toggle:focus-within {
  outline: 2px solid #d0a36d;
  outline-offset: 3px;
}

.cookie-button--accept {
  border-color: #d0a36d;
  background: #d0a36d;
  color: #15130f;
}

.cookie-button--accept:hover {
  background: #ddb47f;
}

.cookie-button--manage {
  border-color: rgba(242, 237, 229, 0.3);
  background: transparent;
  color: #f2ede5;
}

.cookie-button--manage:hover {
  border-color: rgba(242, 237, 229, 0.7);
}

.cookie-button--reject {
  min-height: 34px;
  padding: 0.5rem 0.55rem;
  border: 0;
  background: transparent;
  color: rgba(242, 237, 229, 0.66);
  font-size: 0.6rem;
  text-decoration: underline;
  text-underline-offset: 0.22rem;
}

.cookie-button--reject:hover {
  color: #f2ede5;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cookie-preferences__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 5, 0.78);
  backdrop-filter: blur(9px);
}

.cookie-preferences__panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(820px, calc(100svh - 2rem));
  padding: clamp(1.5rem, 4vw, 2.7rem);
  overflow-y: auto;
  border: 1px solid rgba(208, 163, 109, 0.32);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(185, 138, 85, 0.15), transparent 24rem),
    #10110e;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.62);
  color: #f2ede5;
}

.cookie-preferences__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(242, 237, 229, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: #f2ede5;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-preferences__intro {
  max-width: 500px;
  margin-bottom: 1.5rem !important;
}

.cookie-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(242, 237, 229, 0.12);
}

.cookie-preference-row strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #f2ede5;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
}

.cookie-preference-row p {
  font-size: 0.8rem;
  line-height: 1.5;
}

.cookie-preference-row__status {
  color: #d0a36d;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cookie-preference-row--toggle {
  position: relative;
  cursor: pointer;
}

.cookie-preference-row--toggle input {
  position: absolute;
  right: 0;
  width: 48px;
  height: 26px;
  opacity: 0;
  cursor: pointer;
}

.cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border: 1px solid rgba(242, 237, 229, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.cookie-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f2ede5;
  transition: transform 180ms ease;
}

.cookie-preference-row--toggle input:checked + .cookie-toggle {
  border-color: #d0a36d;
  background: #d0a36d;
}

.cookie-preference-row--toggle input:checked + .cookie-toggle::after {
  transform: translateX(22px);
  background: #15130f;
}

.cookie-preferences__details {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(242, 237, 229, 0.12);
  font-size: 0.72rem !important;
}

.cookie-preferences__actions {
  margin-top: 1.5rem;
}

.cookie-consent-status {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 820px) {
  .cookie-consent {
    bottom: calc(4.7rem + env(safe-area-inset-bottom, 0px));
    padding: 0.7rem;
  }

  .cookie-consent__panel {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    padding: 1.3rem;
    border-radius: 22px;
  }

  .cookie-consent h2,
  .cookie-preferences h2 {
    padding-right: 1.8rem;
    font-size: 1.8rem;
  }

  .cookie-consent p {
    font-size: 0.82rem;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .cookie-consent__actions .cookie-button {
    width: 100%;
  }

  .cookie-consent__actions .cookie-button--reject {
    grid-column: 1 / -1;
    width: auto;
    justify-self: center;
  }

  .cookie-preferences {
    padding: 0.65rem;
  }

  .cookie-preferences__panel {
    max-height: calc(100svh - 1.3rem);
    padding: 1.4rem;
    border-radius: 22px;
  }

  .cookie-preference-row {
    gap: 0.7rem;
  }

  .cookie-preferences__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-preferences__actions .cookie-button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .cookie-button,
  .cookie-toggle,
  .cookie-toggle::after {
    transition: none;
  }
}

@media print {
  .cookie-consent-ui {
    display: none !important;
  }
}
