.custom-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, .6);
}

.custom-popup {
  position: relative;

  width: auto;
  min-width: 75vw;
  max-width: 100vw;

  max-height: 90vh;
  overflow-y: auto;

  background: #232323;
  border-radius: 0;

  padding: 0;
  margin: 20px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

@media screen and (min-width: 1024px) {
  .custom-popup {
    max-width: 75vw;
    min-width: auto;
  }
}

@media screen and (min-width: 1600px) {
  .custom-popup {
    max-width: 50vw;
  }
}

body:not(.dark-theme) .custom-popup {
  background-color: var(--white);
}

.custom-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;

  position: absolute;

  top: 10px;
  right: 10px;
  z-index: 1;

  width: 30px;
  height: 30px;
  padding: 0;

  border: 1px solid var(--lightYellow);
  background-color: var(--lightYellow);
  border-radius: 0;

  cursor: pointer;

  font-size: 32px;
  line-height: 1;

  transition: all .3s;
}

body:not(.dark-theme) .custom-popup-close {
  border: 1px solid var(--yellow);
  background-color: var(--yellow);
}

.custom-popup-close:hover,
.custom-popup-close:focus {
  background-color: #232323;
  border: 1px solid var(--lightYellow);
}

body:not(.dark-theme) .custom-popup-close:hover,
body:not(.dark-theme) .custom-popup-close:focus {
  background-color: var(--white);
}

.custom-popup-close::after,
.custom-popup-close::before {
  content: "";
  position: absolute;
  display: inline-block;
  width: 20px;
  height: 1px;
  background-color: #232323;
}

body:not(.dark-theme) .custom-popup-close::after,
body:not(.dark-theme) .custom-popup-close::before {
  background-color: var(--white);
}

.custom-popup-close::after {
  transform: rotate(45deg);
}

.custom-popup-close::before {
  transform: rotate(-45deg);
}

.custom-popup-close:hover:before,
.custom-popup-close:focus:before,
.custom-popup-close:hover:after,
.custom-popup-close:focus:after {
  background-color: var(--lightYellow);
}

body:not(.dark-theme) .custom-popup-close:hover:before,
body:not(.dark-theme) .custom-popup-close:focus:before,
body:not(.dark-theme) .custom-popup-close:hover:after,
body:not(.dark-theme) .custom-popup-close:focus:after {
  background-color: var(--yellow);
}

.custom-popup-content>*:first-child {
  margin-top: 0;
}

.custom-popup-content>*:last-child {
  margin-bottom: 0;
}

.custom-popup-layout {
  display: flex;
  gap: 24px;
}

.custom-popup-layout.position-top,
.custom-popup-layout.position-bottom {
  flex-direction: column;
}

.custom-popup-layout.position-top .custom-popup-image,
.custom-popup-layout.position-bottom .custom-popup-image {
  max-height: 300px;
}

.custom-popup-layout.position-top .custom-popup-content,
.custom-popup-layout.position-bottom .custom-popup-content {
  min-width: 50vw;
}


.custom-popup-layout.position-left {
  flex-direction: row;
  align-items: center;
}

.custom-popup-layout.position-left .custom-popup-content {
  order: 1;
}

@media screen and (min-width: 1024px) {
  .custom-popup-layout.position-left .custom-popup-content {
    padding-left: 340px;
  }
}

.custom-popup-layout.position-left .custom-popup-image {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}

.custom-popup-layout.position-right {
  flex-direction: row;
  align-items: center;
}

.custom-popup-layout.position-right .custom-popup-content {
  order: 1;
}

@media screen and (min-width: 1024px) {
  .custom-popup-layout.position-right .custom-popup-content {
    padding-right: 340px;
  }
}

.custom-popup-layout.position-right .custom-popup-image {
  order: 2;
}

.custom-popup-layout.position-right .custom-popup-image {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
}

.custom-popup-image {
  display: none;

  width: 100%;
  max-width: 300px;
  height: auto;

  border-radius: 0;
  object-fit: cover;
}

@media screen and (min-width: 1024px) {
  .custom-popup-image {
    display: block;
  }
}

.custom-popup-layout.position-top .custom-popup-image,
.custom-popup-layout.position-bottom .custom-popup-image {
  max-width: 100%;
}

.custom-popup-content {
  flex: 1;
  padding: 40px;
  min-height: 300px;
}

.custom-popup-title {
  margin-top: 0;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .custom-popup-layout {
    flex-direction: column !important;
  }

  .custom-popup-image {
    max-width: 100%;
  }
}

.custom-popup-form {
    margin-top: 24px;
}

.custom-popup-form.contact-us {
  padding: 0;
  border: none !important;
  background: transparent !important;
}

.custom-popup-form.contact-us input:not([type="submit"]) {
  padding-left: 0;
}

.custom-popup-success {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}