/* assets/css/modal.css
   Generieke modal-shell (CLAUDE.md modal-standaard: ×-knop, overlay-klik, ESC).
   Geëxtraheerd uit dashboards/index.html. Bevat alleen de mechaniek (open/dicht,
   overlay, sluitknop) — pagina-specifieke modal-INHOUD (bv. kpi-rijen, chart-grids,
   modal-db-header-kleuren) blijft in de <style> van de betreffende pagina totdat
   bewezen is dat een tweede pagina exact dezelfde inhoud-styling nodig heeft. */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  overflow-y: auto;
}
.modal.active { display: flex; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: #F8F9FA;
  border-radius: 20px;
  width: 100%;
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,.32), 0 8px 24px rgba(0,0,0,.12);
  animation: modal-in .22s cubic-bezier(.22,.68,0,1.2);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  background: rgba(255,255,255,.18);
  border: none;
  color: white;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.32); }

.modal-body { padding: 28px 32px 36px; }

@media (max-width: 640px) {
  .modal { padding: 12px 10px; align-items: center; }
  .modal-content { border-radius: 16px; width: 95vw; max-width: 95vw; max-height: 90vh; overflow-y: auto; margin: auto; }
  .modal-body { padding: 16px; }
}
