/**
 * Modal Accessibility Styles
 * Zorgt voor proper styling van WCAG-compliant modals
 */

/* Zorg dat de body niet scrollt wanneer modal open is */
body.modal-open {
  overflow: hidden;
}

/* Modal overlay - zichtbare achtergrond */
.fs-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  overflow: auto;
}

/* Modal content - zichtbare inhoud */
.fs-modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  width: 90%;
  /* max-width: 800px; */
  margin-top: 50px;
  margin-bottom: 50px;
}

/* Zorg dat focus visible is op focusbare elementen in modal */
.fs-modal button:focus,
.fs-modal a:focus,
.fs-modal input:focus,
.fs-modal select:focus,
.fs-modal textarea:focus,
.fs-modal [role="button"]:focus {
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* Zorg dat de close button keyboard accessible is */
[data-modal-close] {
  cursor: pointer;
  padding: 10px;
  font-size: 28px;
  font-weight: bold;
  border: none;
  background: none;
  color: inherit;
  line-height: 1;
  transition: all 0.2s ease;
}

[data-modal-close]:hover,
[data-modal-close]:focus {
  opacity: 0.7;
}

/* Modal triggers moeten duidelijk interactief zijn */
[data-modal-trigger] {
  cursor: pointer;
}

[data-modal-trigger]:focus {
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* Animatie voor modals */
.fs-animate-top {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Zorgen voor proper contrast in modal */
.fs-modal-content header {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.fs-modal-content h2 {
  margin: 0;
  font-size: 1.5em;
}

/* Zorg dat elementen in de modal goed focusbaar zijn */
.fs-modal *:focus-visible {
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* Zorg voor voldoende contrast voor klein tekst */
.fs-modal {
  color: #333;
}

.fs-modal a {
  color: #0066cc;
  text-decoration: underline;
}

.fs-modal a:visited {
  color: #800080;
}

/* Zorg dat disabled elementen duidelijk zijn */
.fs-modal [disabled],
.fs-modal [aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
