.custom-popup {
  position: fixed;
  inset: 0;
  display: none;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(186, 230, 253, 0.24), transparent 36%),
    radial-gradient(circle at bottom right, rgba(251, 191, 36, 0.18), transparent 28%),
    rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(12px);
  z-index: 100000 !important;
}

.custom-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 760px);
  max-height: calc(100vh - 56px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 44px 38px 34px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow:
    0 32px 90px rgba(15, 23, 42, 0.28),
    0 8px 24px rgba(15, 23, 42, 0.14);
  color: #0f172a;
  text-align: left;
}

.custom-popup-body {
  font-size: 16px;
  line-height: 1.65;
}

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

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

.custom-popup-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

.custom-popup-body a {
  color: #0f766e;
}

.custom-popup-body p,
.custom-popup-body div,
.custom-popup-body center {
  color: inherit;
}

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

.custom-popup-body input[type="text"],
.custom-popup-body input[type="email"],
.custom-popup-body input[type="tel"],
.custom-popup-body input[type="number"],
.custom-popup-body input[type="search"],
.custom-popup-body textarea,
.custom-popup-body select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-size: 15px;
}

.custom-popup-body input[type="text"]:focus,
.custom-popup-body input[type="email"]:focus,
.custom-popup-body input[type="tel"]:focus,
.custom-popup-body input[type="number"]:focus,
.custom-popup-body input[type="search"]:focus,
.custom-popup-body textarea:focus,
.custom-popup-body select:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.custom-popup-body input[type="submit"],
.custom-popup-body button,
.custom-popup-body .button {
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.22);
}

.custom-popup-body input[type="submit"]:hover,
.custom-popup-body button:hover,
.custom-popup-body .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(15, 118, 110, 0.28);
}

.custom-popup-body label {
  display: inline-block;
  margin-bottom: 8px;
  color: #0f172a;
  font-weight: 700;
}

.custom-popup-body .mc-field-group,
.custom-popup-body .clear,
.custom-popup-body .indicates-required,
.custom-popup-body .response {
  margin-bottom: 14px;
}

.custom-popup-body .indicates-required {
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
}

.custom-popup.fullscreen .custom-popup-content {
  inset: 18px;
  width: auto;
  max-height: none;
  transform: none;
  padding: 54px 52px 40px;
  border-radius: 34px;
}

.custom-popup.center50 .custom-popup-content {
  width: min(92vw, 760px);
}

.custom-popup.bottom-left .custom-popup-content,
.custom-popup.bottom-center .custom-popup-content,
.custom-popup.bottom-right .custom-popup-content {
  top: auto;
  bottom: 24px;
  width: min(92vw, 520px);
  transform: none;
}

.custom-popup.bottom-left .custom-popup-content {
  left: 24px;
}

.custom-popup.bottom-center .custom-popup-content {
  left: 50%;
  transform: translateX(-50%);
}

.custom-popup.bottom-right .custom-popup-content {
  left: auto;
  right: 24px;
}

.custom-popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.custom-popup-close:hover {
  background: #cbd5e1;
  transform: rotate(90deg);
}

.custom-popup-close::before,
.custom-popup-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
  transform-origin: center;
}

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

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

@media (max-width: 782px) {
  .custom-popup {
    padding: 14px;
  }

  .custom-popup-content {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    padding: 42px 18px 22px;
    border-radius: 22px;
  }

  .custom-popup.fullscreen .custom-popup-content {
    inset: 14px;
    padding: 42px 18px 22px;
    border-radius: 22px;
  }

  .custom-popup.bottom-left .custom-popup-content,
  .custom-popup.bottom-center .custom-popup-content,
  .custom-popup.bottom-right .custom-popup-content {
    right: 14px;
    left: 14px;
    bottom: 14px;
    width: auto;
    transform: none;
  }
}
