#statistiekkeuze {
  position: fixed;
  z-index: 15;
  inset-inline-start: max(16px, env(safe-area-inset-left));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  width: min(28rem, calc(100% - 32px));
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid #cbd6e7;
  border-radius: var(--vlak-radius, 18px);
  box-shadow: 0 8px 32px rgb(33 50 81 / 12%);
  background: #fff;
  color: var(--ink, #202735);
}

#statistiekkeuze[hidden],
#statistiekkeuze [hidden],
body:has(dialog[open]) #statistiekkeuze {
  display: none;
}

#statistiekkeuze h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.03em;
}

#statistiekkeuze p {
  margin: 8px 0 0;
  color: var(--muted, #465263);
  font-size: .9375rem;
  line-height: 1.5;
}

#statistiekkeuze a {
  color: var(--action-blue, #2c4dca);
  text-decoration: underline;
  text-underline-offset: .16em;
}

.statistiekkeuze-acties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.statistiekkeuze-acties button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a6b7dc;
  border-radius: 999px;
  background: #f3f6ff;
  color: #233f9d;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
}

.statistiekkeuze-acties button:is(:hover, :focus-visible) {
  background: #e5ecff;
  border-color: var(--action-blue, #2c4dca);
}

.slotvoet-basis:has(.statistiekkeuze-link) {
  flex-wrap: wrap;
}

.slotvoet-basis:has(.statistiekkeuze-link) small {
  margin-inline-end: auto;
}

.statistiekkeuze-link {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.statistiekkeuze-link:is(:hover, :focus-visible) {
  color: var(--action-blue, #2c4dca);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keep all content reachable on small screens and at high zoom. */
@media (max-width: 600px), (max-height: 420px) {
  #statistiekkeuze {
    position: relative;
    inset: auto;
    z-index: 2;
    width: auto;
    margin: 12px var(--gutter, 16px);
    box-shadow: none;
  }
}

@media print {
  #statistiekkeuze, .statistiekkeuze-link { display: none; }
}
