.mtess-popup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--mtess-popup-overlay-bg);
  z-index: 999999;
  padding: 18px;
  opacity: 1;
  animation-name: fadeIn;
  animation-duration: 1s;
}

.mtess-popup-window {
  width: 100%;
  max-width: var(--mtess-popup-width, 720px);
  background: var(--mtess-popup-bg);
  border-radius: var(--mtess-popup-radius);
  box-shadow: var(--mtess-popup-shadow);
  position: relative;
  /*padding: var(--mtess-popup-padding);*/
  overflow: hidden;
}

.mtess-popup-close{
  position:absolute;
  top:8px;
  right:8px;
  border:0;
  cursor:pointer;
  width:30px;
  height:30px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background:var(--mtess-popup-button-bg);
  color:var(--mtess-popup-button-color);
  border-radius:50%;

  transition:transform .15s ease, filter .15s ease, opacity .15s ease;
}

.mtess-popup-close-icon{
  width:16px;
  height:16px;
  display:block;
  stroke:currentColor;
  stroke-width:2.5;
  stroke-linecap:round;
  fill:none;
}

.mtess-popup-close:hover{
  transform:rotate(90deg) scale(1.05);
  filter:brightness(1.05);
}

.mtess-popup-close:focus-visible{
  outline:2px solid var(--mtess-popup-button-bg);
  outline-offset: 2px;
}

/*
.mtess-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  width: 30px;
  height: 30px;
  padding: 2px;
  background: var(--mtess-popup-button-bg);
  color: var(--mtess-popup-button-color) !important;
  font-weight: 700;
  border-radius: 50%;
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}

.mtess-popup-close:hover{
  transform: rotate(90deg) scale(1.05);
  filter: brightness(1.05);
}*/

.mtess-popup-inner {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.mtess-popup-inner.layout-left { flex-direction: row; }
.mtess-popup-inner.layout-right { flex-direction: row-reverse; }
.mtess-popup-inner.layout-top { flex-direction: column; }

.mtess-popup-inner.layout-left,
.mtess-popup-inner.layout-right,
.mtess-popup-inner.layout-top,
.mtess-popup-inner.layout-bottom {
    padding: var(--mtess-popup-padding);
}

.has-bg-col .mtess-popup-inner.layout-left,
.has-bg-col .mtess-popup-inner.layout-right,
.has-bg-col .mtess-popup-inner.layout-top,
.has-bg-col .mtess-popup-inner.layout-bottom {
    padding: 0px;
}

.has-bg-col .mtess-popup-inner.layout-left .mtess-popup-content-col,
.has-bg-col .mtess-popup-inner.layout-right .mtess-popup-content-col,
.has-bg-col .mtess-popup-inner.layout-top .mtess-popup-content-col,
.has-bg-col .mtess-popup-inner.layout-bottom .mtess-popup-content-col {
     padding: var(--mtess-popup-padding);
}

.has-bg-col .mtess-popup-inner { gap: 0px; }

.mtess-popup-inner.layout-top .mtess-popup-image-col,
.mtess-popup-inner.layout-bottom .mtess-popup-image-col {
  flex: 0 0 auto;
  width: 100%;
  height: var(--mtess-popup-image-size, 220px);
}


.mtess-popup-col { min-width: 0; }

.mtess-popup-image-col {
  flex: 0 0 var(--mtess-popup-image-size, 35%);
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 120px;
}


.mtess-popup-content-col {
  flex: 1 1 60%;
}

.mtess-popup-window.no-image .mtess-popup-content-col {
  flex: 1 1 100%;
}

.mtess-popup-inner.layout-bottom { flex-direction: column-reverse; }

.mtess-popup-window.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.mtess-popup-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.mtess-popup-title {
  margin: 0 0 10px;
  color: var(--mtess-popup-title-color, inherit);
}

/* nur für die div-Varianten */
.mtess-title-bold { font-weight: 700; }
.mtess-title-text { font-weight: 400; }

.mtess-popup-content {
  color: var(--mtess-popup-text-color, inherit);
  line-height: var(--mtess-popup-line-height, inherit);
}

.mtess-popup-button-wrap {
  margin-top: 14px;
}

.mtess-popup-button {
  display: inline-block;
  padding: 5px 15px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  background: var(--mtess-popup-button-bg);
  color: var(--mtess-popup-button-color) !important;
}

.mtess-popup-button:hover {
  opacity: 0.92;
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fadeIn {
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
}


@media (max-width: 720px){
  .mtess-popup-window.mobile-img-hide .mtess-popup-image-col{ display:none; }
  .mtess-popup-window.mobile-img-hide .mtess-popup-content-col{ flex: 1 1 100%; }

  .mtess-popup-window.mobile-img-stack .mtess-popup-inner{ flex-direction: column !important; }
  .mtess-popup-window.mobile-img-stack .mtess-popup-image-col{
    width:100%;
    flex: 0 0 auto;
  }

  /* min-height nur relevant wenn bg_* im Einsatz (harmlos wenn nicht) */
  .has-bg-col .mtess-popup-image-col{
    min-height: var(--mtess-popup-image-minh-mobile, 120px);
  }
}

/*
@media (max-width: 720px) {
    .mtess-popup-image-col {
        flex: 1 1 100%;
        min-height: var(--mtess-popup-image-minh-mobile, 120px);
    }
    .mtess-popup-content-col { flex: 1 1 100%; }
    
    .mtess-popup-window.mobile-img-hide .mtess-popup-image-col{
        display:none;
    }
    .mtess-popup-window.mobile-img-hide .mtess-popup-content-col{
        flex: 1 1 100%;
    }

    .mtess-popup-window.mobile-img-stack .mtess-popup-inner{
        flex-direction: column !important;
    }
    .mtess-popup-window.mobile-img-stack .mtess-popup-image-col{
        width:100%;
        flex: 0 0 auto;
    }
}*/