.pd-app-popup {
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.pd-app-popup[hidden] {
  display: none !important;
}

.pd-app-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 74, 97, 0.62);
  backdrop-filter: blur(4px);
  animation: pd-app-popup-backdrop-in 0.4s ease;
}

.pd-app-popup__dialog {
  position: relative;
  width: min(720px, 100%);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #1e5f7a 0%,
    #1a5570 42%,
    #164a61 72%,
    #123c4f 100%
  );
  background-size: 220% 220%;
  animation:
    pd-app-popup-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    pd-app-popup-bg-shift 8s ease-in-out infinite;
  box-shadow:
    0 28px 80px rgba(18, 60, 79, 0.38),
    0 0 0 1px rgba(235, 137, 68, 0.12);
}

.pd-app-popup__dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(235, 137, 68, 0.22), transparent 38%),
    radial-gradient(circle at 12% 88%, rgba(47, 127, 179, 0.16), transparent 42%);
  pointer-events: none;
}

.pd-app-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pd-app-popup__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pd-app-popup__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(200px, 0.85fr);
  gap: 16px;
  padding: 22px 22px 22px 26px;
  min-height: 260px;
}

.pd-app-popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  padding-right: 12px;
}

.pd-app-popup__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eb8944;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pd-app-popup__title {
  margin: 0 0 10px;
  font-family: Poppins, sans-serif;
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.pd-app-popup__title-keep {
  white-space: nowrap;
}

.pd-app-popup__text {
  margin: 0 0 18px;
  max-width: 420px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.pd-app-popup__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pd-app-popup__store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.pd-app-popup__store:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.pd-app-popup__store i {
  font-size: 17px;
}

.pd-app-popup__store span {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.1;
}

.pd-app-popup__store small {
  font-size: 8.5px;
  font-weight: 500;
  opacity: 0.85;
}

.pd-app-popup__visual {
  position: relative;
  min-height: 300px;
}

.pd-app-popup__phone {
  position: absolute;
  right: 18px;
  top: 8px;
  width: 170px;
  height: 320px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ef7f32 0%, #ef7f32 18%, #1f6fb2 82%, #1f6fb2 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: rotate(8deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pd-app-popup__phone span {
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.pd-app-popup__qr-card {
  position: absolute;
  right: 0;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 30, 69, 0.18);
}

.pd-app-popup__qr-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

.pd-app-popup__qr-copy {
  display: none;
}

body.pd-app-popup-open {
  overflow: hidden;
}

@keyframes pd-app-popup-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pd-app-popup-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pd-app-popup-bg-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-app-popup__backdrop,
  .pd-app-popup__dialog {
    animation: none;
  }

  .pd-app-popup__dialog {
    background-size: auto;
  }
}

@media (max-width: 900px) and (min-width: 576px) {
  .pd-app-popup__inner {
    grid-template-columns: minmax(0, 1fr) minmax(148px, 0.72fr);
    gap: 12px;
    padding: 20px 18px 20px 22px;
    min-height: 0;
  }

  .pd-app-popup__content {
    padding-right: 4px;
  }

  .pd-app-popup__title {
    font-size: clamp(1rem, 2.4vw, 1.28rem);
  }

  .pd-app-popup__text {
    margin-bottom: 14px;
    font-size: 13px;
    max-width: none;
  }

  .pd-app-popup__visual {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pd-app-popup__qr-card {
    position: static;
    transform: none;
    padding: 14px;
    margin: 0 auto;
  }

  .pd-app-popup__qr-card img {
    width: 118px;
    height: 118px;
  }
}

@media (max-width: 575px) {
  .pd-app-popup {
    padding: 12px;
  }

  .pd-app-popup__inner {
    grid-template-columns: 1fr;
    padding: 20px 18px 22px;
    gap: 14px;
  }

  .pd-app-popup__content {
    padding-right: 0;
  }

  .pd-app-popup__dialog {
    border-radius: 22px;
  }

  .pd-app-popup__stores {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pd-app-popup__store {
    width: auto;
    min-width: 0;
    padding: 6px 11px;
    gap: 6px;
  }

  .pd-app-popup__store i {
    font-size: 15px;
  }

  .pd-app-popup__store span {
    font-size: 10px;
  }

  .pd-app-popup__store small {
    font-size: 7.5px;
  }

  .pd-app-popup__visual {
    position: static;
    min-height: 0;
    margin-top: 2px;
    display: flex;
    justify-content: center;
  }

  .pd-app-popup__phone {
    width: 140px;
    height: 260px;
    right: 50%;
    transform: translateX(52%) rotate(8deg);
  }

  .pd-app-popup__qr-card {
    position: static;
    transform: none;
    flex-direction: column;
    text-align: center;
    padding: 14px;
    margin: 0 auto;
  }

  .pd-app-popup__qr-card img {
    width: 132px;
    height: 132px;
  }
}
