@import url('https://fonts.googleapis.com/css2?family=Ephesis&display=swap');

.legal-page {
  margin: 0;
  background: #f7f4ef;
  color: #302820;
  font: 1rem/1.65 system-ui, sans-serif;
}

.legal-document {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px);
}

.legal-document h1 {
  font: 400 clamp(2.25rem, 6vw, 3.5rem)/1.15 Georgia, serif;
  margin: 1.5rem 0;
}

.legal-document h2 {
  margin: 1.6rem 0 .4rem;
  font-size: 1.2rem;
}

.legal-document p { margin: .6rem 0; }
.legal-document a { color: #644724; }
.legal-document dt { font-weight: 700; margin-top: .5rem; }
.legal-document dd { margin: 0; }
.legal-document code { overflow-wrap: anywhere; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  padding: 1rem;
}

.legal-page .legal-links { border-top: 1px solid #dacbb8; }

.legal-links a,
.cookie-settings {
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.cookie-settings {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.cookie-settings[hidden],
.cookie-dialog [hidden],
[data-cookie-map][hidden] {
  display: none;
}

.developer-credit {
  display: grid;
  justify-items: center;
  gap: .15rem;
  color: inherit;
  padding: 1rem;
}

.developer-credit a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: inherit;
  font: 2rem/1.2 Ephesis, cursive;
  text-decoration: none;
}

.developer-credit img { flex-shrink: 0; }

.cookie-dialog {
  position: fixed;
  inset: auto auto max(.75rem, env(safe-area-inset-bottom)) .75rem;
  z-index: 1001;
  box-sizing: border-box;
  width: min(21rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 2rem);
  margin: 0;
  padding: .75rem;
  border: 1px solid #d9c6ab;
  border-radius: 12px;
  background: #fffdf9;
  color: #302820;
  font: .875rem/1.4 system-ui, sans-serif;
  box-shadow: 0 4px 18px #21190e26;
}

.cookie-dialog h2 { margin: 0 0 .25rem; font: 400 1.125rem Georgia, serif; }
.cookie-dialog p { margin: 0 0 .625rem; }
.cookie-dialog a { color: #644724; text-decoration: underline; }
.cookie-dialog fieldset { padding: 0; margin: 0 0 .625rem; border: 0; }
.cookie-dialog label { display: block; padding: .2rem 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.cookie-actions button {
  flex: 1 1 auto;
  min-height: 36px;
  padding: .375rem .5rem;
  border: 1px solid #84694b;
  border-radius: 8px;
  background: #f4ebe0;
  color: #302820;
  font: 600 .8125rem system-ui, sans-serif;
  cursor: default;
}

.cookie-actions button:not(:disabled) { cursor: pointer; }
.cookie-actions button:not(:disabled):hover { background: #eadecd; }

@media (max-width: 600px) {
  .cookie-dialog {
    left: .5rem;
    width: min(19rem, calc(100% - 1rem));
    padding: .5rem .625rem;
    font-size: .8125rem;
    line-height: 1.3;
  }

  .cookie-dialog h2 { font-size: 1rem; }
  .cookie-dialog p { margin-bottom: .375rem; }
  .cookie-actions { gap: .25rem; }

  .cookie-actions button {
    min-height: 34px;
    padding: .25rem .375rem;
    font-size: .75rem;
  }
}

@media (max-width: 450px) {
  body:has(#robbu-whatsapp-button) .cookie-dialog[open] {
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + .75rem));
    max-height: calc(100dvh - 6.5rem);
  }
}
