.popup_overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  pointer-events: none;
  transition:
    background-color 300ms,
    backdrop-filter 300ms;
}

.popup_overlay_show {
  background-color: rgba(54, 23, 0, 0.08);
  backdrop-filter: blur(5px);
  pointer-events: all;
}

.popup__content {
  position: relative;
  width: 100%;
  max-width: 40rem;
  background: #fff;
  border: 1px solid var(--gray);
  padding: 2rem;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.popup_overlay:not(.popup_overlay_show) .popup__content {
  opacity: 0;
  transform: translateY(1.25rem) scale(0.98);
}

.popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--gray);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 300ms;
}

.popup__close-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.popup__title {
  margin: 0 0 0.75rem;
  padding-right: 3rem;
  font-family: "RFDewiExtended";
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
}

.popup__description {
  margin: 0 0 1.5rem;
  font-family: "PPNeueMontreal";
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text);
}

.popup__form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popup__form p {
  margin: 0;
}

.popup__form br {
  display: none;
}

.popup__form input[type="submit"] {
  align-self: flex-start;
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--text);
  background: var(--text);
  color: #fff;
  font-family: "RFDewiExtended";
  font-size: 1rem;
  cursor: pointer;
  transition: all 300ms;
}

.popup__content_menu {
  max-width: 24rem;
}

#menu.popup_overlay {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

#menu .popup__content {
  max-width: 24rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-top: none;
  border-bottom: none;
  border-left: none;
  transform: translateX(0);
  opacity: 1;
  transition: transform 300ms ease;
}

#menu.popup_overlay:not(.popup_overlay_show) .popup__content {
  transform: translateX(-100%);
  opacity: 1;
}

.popup__navigation ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  padding-right: 3rem;
  font-size: 1.125rem;
  text-transform: lowercase;
}

.popup__navigation ul a {
  color: var(--text);
  transition: color 300ms;
}

.popup__contact-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  border: 1px solid var(--gray);
  border-left: none;
  border-right: none;
}

#contact-form .popup__content {
  align-self: center;
  margin-inline: auto;
}

#contact-form .popup__title,
#contact-form .popup__description,
#contact-form .popup__form label {
  text-transform: lowercase;
}

#contact-video .popup__content {
  align-self: center;
  margin-inline: auto;
  max-width: min(40rem, calc(100% - 2rem));
  padding: 0;
  background: #000;
  border: none;
  overflow: hidden;
}

#contact-video .popup__close {
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.contact-video-popup__video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

@media (hover: hover) {
  .popup__close:hover {
    color: black;
    background-color: var(--gray);
  }

  .popup__form input[type="submit"]:hover {
    background-color: #fff;
    color: var(--text);
  }

  .popup__navigation ul a:hover {
    color: black;
  }

  .popup__contact-btn:hover {
    color: black !important;
    background-color: var(--gray);
  }
}

@media (max-width: 768px) {
  .popup__content {
    padding: 1rem;
  }
}
