.cookie-consent[hidden] {
  display: none;
}

.cookie-consent {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 1.25rem;
  background: rgba(16, 17, 0, .55);
  font-family: 'Hanken Grotesk', sans-serif;
}

.cookie-consent__panel {
  width: min(100%, 680px);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: #2c2f00;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .24);
}

.cookie-consent__panel h2 {
  margin: 0 0 .65rem;
  color: #2c2f00;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
}

.cookie-consent__panel p {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.cookie-consent__policy-toggle,
.cookie-consent__close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #54572f;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-consent__policy {
  max-height: 32vh;
  overflow: auto;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #dedfc8;
  border-radius: 10px;
  background: #fafaf4;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cookie-consent__acknowledgement {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 1.25rem 0;
  line-height: 1.45;
  cursor: pointer;
}

.cookie-consent__acknowledgement input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin-top: .15rem;
  accent-color: #54572f;
}

.cookie-consent__warning,
.cookie-consent__feedback {
  color: #9c2f24;
  font-weight: 600;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.cookie-consent__button {
  min-height: 46px;
  flex: 1 1 220px;
  padding: .7rem 1rem;
  border: 1px solid #54572f;
  border-radius: 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.cookie-consent__button--accept {
  background: #54572f;
  color: #fff;
}

.cookie-consent__button--reject {
  background: #fff;
  color: #2c2f00;
}

.cookie-consent__button:hover:not(:disabled) {
  background: #2c2f00;
  color: #fff;
}

.cookie-consent__button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.cookie-consent__close {
  margin-top: 1rem;
}

.cookie-consent-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  .cookie-consent {
    align-items: end;
    justify-items: end;
    padding: 1rem;
  }

  .cookie-consent__panel {
    width: min(100%, 480px);
    max-height: min(72vh, 640px);
    padding: 1.25rem;
    border-radius: 18px;
  }

  .cookie-consent__panel h2 {
    font-size: 1.35rem;
  }

  .cookie-consent__panel p {
    margin-bottom: .75rem;
    font-size: .95rem;
    line-height: 1.45;
  }

  .cookie-consent__policy {
    max-height: 26vh;
    margin: .75rem 0;
    padding: .75rem;
    font-size: .9rem;
  }

  .cookie-consent__acknowledgement {
    gap: .5rem;
    margin: .9rem 0;
    font-size: .9rem;
  }

  .cookie-consent__actions {
    gap: .5rem;
    margin-top: .9rem;
  }

  .cookie-consent__button {
    min-height: 40px;
    flex-basis: 0;
    padding: .55rem .65rem;
    font-size: .85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__button {
    transition: none;
  }
}
