.gb-lead-popup {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.gb-lead-popup.is-open {
  pointer-events: auto;
}

.gb-lead-popup[hidden] {
  display: none !important;
}

.gb-lead-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 51, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gb-lead-popup.is-open .gb-lead-popup__backdrop {
  opacity: 1;
}

.gb-lead-popup__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1120px, calc(100vw - 32px));
  max-height: min(94dvh, 900px);
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  overflow: hidden;
}

.gb-lead-popup.is-open .gb-lead-popup__sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.gb-lead-popup__handle {
  display: none;
}

.gb-lead-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(11, 21, 51, 0.12);
  cursor: pointer;
}

.gb-lead-popup__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gb-lead-popup__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 12px;
}

body.gb-lead-popup-open {
  overflow: hidden;
}

.gb-btn--lead-popup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.gb-mobile-drawer__lead-popup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 639px) {
  .gb-lead-popup {
    align-items: flex-end;
    padding: 0;
  }

  .gb-lead-popup__sheet {
    max-width: 100%;
    height: auto;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
  }

  .gb-lead-popup.is-open .gb-lead-popup__sheet {
    transform: translateY(0);
  }

  .gb-lead-popup__handle {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 32px;
    height: 4px;
    border-radius: 999px;
    background: rgba(11, 21, 51, 0.22);
    margin: 0;
    flex-shrink: 0;
  }

  .gb-lead-popup__close {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .gb-lead-popup__body {
    flex: 0 1 auto;
    overflow: visible;
    padding: 0 0 max(8px, env(safe-area-inset-bottom));
  }

  .gb-lead-popup__close {
    top: 10px;
    right: 10px;
    z-index: 8;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  }
}
