[hidden] {
  display: none;
}

.cookie-consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 2147483000;
  box-sizing: border-box;
  padding: 1rem;
  color: #2d251f;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #d8c7b8;
  box-shadow: 0 -0.4rem 1.5rem rgba(40, 28, 18, 0.18);
  font: 400 0.95rem/1.5 system-ui, sans-serif;
}

.cookie-consent__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  width: min(100%, 76rem);
  margin-inline: auto;
}

.cookie-consent__copy h2 {
  margin: 0 0 0.35rem;
  color: #37271b;
  font-size: 1.05rem;
  font-weight: 700;
}

.cookie-consent__copy p {
  margin: 0;
}

.cookie-consent a {
  color: #80552f;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

.cookie-consent button,
.cookie-consent__trigger {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  color: #fff;
  background: #77502e;
  border: 1px solid #77502e;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.cookie-consent button[data-cookie-action="reject"],
.cookie-consent button[data-cookie-action="settings"] {
  color: #493728;
  background: #fff;
}

.cookie-consent button:hover,
.cookie-consent__trigger:hover {
  filter: brightness(0.94);
}

.cookie-consent button:focus-visible,
.cookie-consent__trigger:focus-visible,
.cookie-consent a:focus-visible,
.cookie-consent input:focus-visible {
  outline: 3px solid #bf7c28;
  outline-offset: 3px;
}

.cookie-consent__settings {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid #e6ded7;
}

.cookie-consent__settings[hidden] {
  display: none;
}

.cookie-consent__settings label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 42rem;
}

.cookie-consent__settings input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: #77502e;
}

.cookie-consent__error {
  grid-column: 1 / -1;
  margin: 0;
  color: #9b1c1c;
  font-weight: 650;
}

.cookie-consent__trigger {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2147482999;
  box-shadow: 0 0.2rem 0.75rem rgba(40, 28, 18, 0.2);
}

@media (max-width: 46rem) {
  .cookie-consent {
    max-height: min(78vh, 36rem);
    overflow-y: auto;
    padding: 0.85rem;
  }

  .cookie-consent__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .cookie-consent__actions,
  .cookie-consent__settings {
    justify-content: stretch;
  }

  .cookie-consent__actions button {
    flex: 1 1 10rem;
  }

  .cookie-consent__trigger {
    right: 0.65rem;
    bottom: 0.65rem;
  }
}

/* The active CTA size and the cookie-trigger clearance share one layout contract. */
:root {
  --sticky-cta-height: calc(5.75rem + 1px);
}

@media (max-width: 63.999rem) {
  #sticky-cta {
    box-sizing: border-box;
    height: var(--sticky-cta-height);
  }

  .cookie-consent__trigger {
    transition: bottom 300ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  body:has(#sticky-cta:not(.translate-y-full)) .cookie-consent__trigger {
    bottom: calc(var(--sticky-cta-height) + 0.65rem);
  }
}
