/* Overlay */
#wp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
/*
.overlay-content {
  position: relative;
  background: #fff;
  max-width: 900px;
  margin: 5vh auto;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 6px;
}
  */


.overlay-content-wrapper {
  /* Container selbst zentrieren */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  /* Styling */
  background: hsl(133, 37%, 90%);
  min-width: 40vh;
  max-width: 900px;
  padding: 2rem;
  min-height: 20vh;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 6px;

  /* Inhalte IM Container zentrieren */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertikal */
  align-items: center;     /* horizontal */
  text-align: center;      /* Text */
}


/*
.overlay-content-wrapper {
  position: relative;
  background: #fff;
  max-width: 900px;
  margin: 5vh auto;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 6px;
}
*/
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  animation: fadeIn 0.3s ease forwards;
}

.overlay-content-wrapper {
  background:  hsl(133, 37%, 90%);
  max-width: 900px;
  max-height: 90vh;
  padding: 2rem;
  overflow-y: auto;
  border-radius: 6px;
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  opacity: 0;
  transform: scale(0.85);
  animation: popIn 0.35s ease forwards; 
  top: 0%;
  left: 0%;
}

/* Schließen-Button */
.overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  color: #193ea3;
}
.overlay-close:hover {
  color: #000;
}

/* Fade-In Hintergrund */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Pop-In Inhalt */
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Fade-Out-Klassen wie schon vorher */
.overlay.fadeOut {
  animation: fadeOut 0.25s ease forwards;
}


@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}


.overlay-content-wrapper.fadeOutContent {
  animation: popOut 0.2s ease forwards;
}


@keyframes popOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

