.cookie-panel[hidden],
.cookie-settings[hidden] {
  display: none;
}

.analytics-context {
  position: fixed;
  inset: auto auto -100px -100px;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.cookie-panel {
  position: fixed;
  z-index: 20;
  inset-inline: auto 1rem;
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1rem 1.125rem;
  color: var(--p-ink, #3a3028);
  background: var(--p-surface, #faf7f2);
  border: 1px solid #d4c6b7;
  border-radius: var(--r-lg, 12px);
  box-shadow: 0 6px 24px #3a30282b;
}

.cookie-panel h2 {
  margin: 0 0 .35rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.cookie-panel p {
  margin: 0 0 .6rem;
  font-size: .925rem;
  line-height: 1.45;
}

.cookie-panel summary {
  cursor: pointer;
  font-size: .9rem;
  text-decoration: underline;
}

.cookie-panel details[open] p {
  margin: .35rem 0 0;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.cookie-actions button {
  flex: 1 1 7.5rem;
  min-height: 44px;
  padding: .35rem .55rem;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

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

.cookie-settings {
  color: inherit;
  background: transparent;
  border: 0;
  padding: .25rem 0;
  min-height: 32px;
  font: inherit;
  text-align: start;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-panel button:focus-visible,
.cookie-panel summary:focus-visible,
.cookie-settings:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
