.cookie-notice[hidden] { display: none !important; }

.cookie-notice, .cookie-preferences {
  color: var(--text, #111);
  background: var(--surface, #f8f7f3);
  border: 2px solid var(--primary, #c8a862);
  border-radius: var(--radius-lg, 16px);
  font-family: var(--font-body, Arial, sans-serif);
  padding: clamp(12px, 3vw, 24px);
  box-shadow: 0 8px 32px #0003;
}

.cookie-notice {
  position: fixed;
  z-index: 90;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 12px;
  width: min(540px, calc(100% - 24px));
  max-height: 46vh;
  max-height: 46dvh;
  overflow: auto;
  font-size: .875rem;
}

.cookie-notice p, .cookie-preferences p { margin: 0 0 8px; }
.cookie-notice a, .cookie-preferences a, .cookie-footer a { text-decoration: underline; }
.cookie-preferences { width: min(520px, calc(100% - 24px)); max-height: 90dvh; overflow: auto; }
.cookie-preferences::backdrop { background: #0008; }
.cookie-preferences h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.cookie-preferences fieldset { margin: 12px 0; padding: 0; border: 0; }
.cookie-preferences legend { font-weight: 700; }
.cookie-preferences label, .cookie-required { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 10px 0; border-bottom: 1px solid var(--border, #d6d0c3); }
.cookie-preferences small { display: block; font-size: .875rem; }
.cookie-preferences input { inline-size: 20px; block-size: 20px; flex-shrink: 0; accent-color: var(--success, #226b47); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cookie-actions button {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--text-muted, #5f6368);
  border-radius: var(--radius-button, 8px);
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cookie-actions button { flex: 1 0 auto; }
.cookie-actions button:hover { background: var(--primary-soft, #f1e6cc); }
.cookie-notice :focus-visible, .cookie-preferences :focus-visible { outline: 2px solid var(--focus, #000); outline-offset: 2px; }
.cookie-footer { padding-block: 12px; }
.cookie-footer a { display: inline-flex; min-height: 44px; align-items: center; }

html:has(.cookie-notice:not([hidden])) .wa-float { visibility: hidden; }
