.cookie-links {
  display: grid;
  justify-items: end;
  gap: .3rem;
}

.cookie-links button,
#cookie-panel button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.cookie-links button,
#cookie-panel [data-choice="custom"] {
  padding: .25rem 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .22em;
}

#cookie-panel {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(26rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid #dbd7cd;
  border-radius: .85rem;
  background: #f8f6f1;
  color: #343c33;
  box-shadow: 0 .5rem 2rem #24201826;
  font: 1rem/1.4 var(--body-font);
}

#cookie-panel::backdrop {
  background: rgb(10 13 12 / 94%);
}

#cookie-panel h2 {
  margin: 0;
  font: 400 1.7rem/1.1 var(--heading-font);
}

#cookie-panel p { margin: .8rem 0; }

#cookie-panel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.5rem;
}

#cookie-panel input {
  appearance: none;
  width: 2.65rem;
  height: 1.55rem;
  margin: 0;
  padding: .2rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  background: #75756e;
  cursor: pointer;
}

#cookie-panel input::before {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
}

#cookie-panel input:checked { background: #880621; }
#cookie-panel input:checked::before { transform: translateX(1.1rem); }
#cookie-panel input:disabled { cursor: default; opacity: .78; }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 .4rem;
}

.cookie-actions button {
  flex: 1 1 9rem;
  min-height: 44px;
  padding: .45rem .7rem;
  border: 1px solid currentColor;
  border-radius: 2rem;
  background: transparent;
}

.cookie-actions button:hover { background: #eae6dd; }
