/* --------------------------------------------|
|                                              |
|  Component Dialog                            |
|                                              |
|-------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 2em 0;
}

.modal[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  min-width: 0;
  max-width: 600px;
  width: 100%;
  transform: translateY(-40px);
  transition: transform 0.3s;
  margin: 3vh 1em;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
}

.modal[data-open="true"] .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.5em 0.5em 0.5em 1em;
  border-bottom: 1px solid #eee;
  min-height: 2.5em;
  flex-shrink: 0;
}

.modal-close {
  width: 2.5em;
  height: 2.5em;
  background: transparent;
  border: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.5em 1.5em;
  background-image: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZSB4MT0iNC41IiB5MT0iNC41IiB4Mj0iMTEuNSIgeTI9IjExLjUiLz48bGluZSB4MT0iMTEuNSIgeTE9IjQuNSIgeDI9IjQuNSIgeTI9IjExLjUiLz48L3N2Zz4=');
  transition: background-color 0.2s;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover,
.modal-close:focus {
  background-color: #f2f2f2;
  outline: none;
}

.modal-body {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 40px;
}
@media (max-width: 630px) {
  .modal-content {
    max-width: 98vw;
    margin: 2vw;
  }
}
/* Für body-no-scroll, verhindert Scrollen des Hintergrunds */
body.body-no-scroll {
  overflow: hidden !important;
  touch-action: none;
  overscroll-behavior: contain;
}
