/* Modal Overlay / Container */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: auto; /* wichtig: Modal selbst scrollt */
    background-color: rgba(0, 0, 0, 0.5);
  }

  /* Sichtbar */
  .modal.show {
    display: block;
  }

  /* Zentrierung & Breite des Dialogs */
  .modal-dialog {
    position: relative;
    margin: 2rem auto;
    max-width: 600px;
  }

  /* Modal-Inhalt mit max-Höhe und eigenem Scrollbereich */
  .modal-content {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: .3rem;
    overflow: hidden;
    max-height: 90vh;       /* maximale Höhe des Modals */
  }

  /* Scrollbarer Bereich für Inhalt */
  .modal-body {
    overflow-y: auto;
    padding: 1rem;
    flex: 1 1 auto;
  }

  /* Header / Footer (optional) */
  .modal-header,
  .modal-footer {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
  }

  .modal-footer {
    border-top: 1px solid #dee2e6;
  }

  /* Keine Blockierung des Body-Scrollings */
  body.modal-open {
    overflow: auto; /* Optional komplett entfernen */
  }
