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

.cookie-settings {
  padding: 0.5rem 1rem 1rem;
  text-align: center;
  color: #432625;
  background: #fff9f4;
}

.cookie-settings button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.45rem;
  font: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.cookie-panel {
  box-sizing: border-box;
  position: fixed;
  z-index: 20;
  inset-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
  inset-block-end: max(0.75rem, env(safe-area-inset-bottom));
  margin-inline: auto;
  max-width: 52rem;
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem 1.5rem;
  align-items: center;
  border: 1px solid #dec5be;
  background: #fff9f4;
  color: #432625;
  box-shadow: 0 0.4rem 2rem #3219192e;
}

.cookie-panel h2 {
  margin: 0 0 0.35rem;
  font: 600 1.125rem/1.25 Georgia, serif;
}

.cookie-panel p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.cookie-panel p + p { margin-top: 0.35rem; }

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-actions button {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #754b4a;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-actions button:disabled { opacity: 0.6; cursor: default; }
.cookie-actions button:not(:disabled):hover { background: #f5e4dd; }
.cookie-panel :focus-visible, .cookie-settings button:focus-visible { outline: 2px solid #754b4a; outline-offset: 3px; }

@media (max-width: 44rem) {
  .cookie-panel { grid-template-columns: 1fr; }
  .cookie-actions { flex-wrap: wrap; }
  .cookie-actions button { flex: 1 0 auto; }
}
