/* Weboment Scroll Popup — frontend styles */

html.wsp-scroll-lock,
body.wsp-scroll-lock {
  overflow: hidden !important;
  height: 100%;
}

.wsp-popup-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.wsp-popup-root[hidden] {
  display: none !important;
}

.wsp-popup-root.is-visible {
  pointer-events: auto;
}

.wsp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wsp-popup-root.is-visible .wsp-backdrop {
  opacity: 1;
}

.wsp-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--wsp-bg, #fff);
  border-radius: var(--wsp-radius, 16px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 28px 24px 24px;
  outline: none;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  font-family: var(--wsp-font, inherit);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.wsp-popup-root.mode-calendly .wsp-dialog {
  width: min(94vw, 880px);
  height: min(96vh, 960px);
  max-height: min(96vh, 960px);
  overflow: hidden;
  padding: 0;
}

/* Keep the generic title/subtitle in the accessibility tree (dialog is
   aria-labelledby/aria-describedby them) but hide them visually in Calendly
   mode, since the Calendly widget already shows its own event title. */
.wsp-popup-root.mode-calendly .wsp-title,
.wsp-popup-root.mode-calendly .wsp-subtitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wsp-dialog.pos-bottom-right {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(92vw, 420px);
  max-height: min(80vh, 640px);
}

.wsp-dialog.pos-fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

/* Restore true fullscreen sizing on mobile even when Calendly mode's wider
   desktop dialog rule would otherwise win on specificity. */
.wsp-popup-root.mode-calendly .wsp-dialog.pos-fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
}

.wsp-popup-root.is-visible .wsp-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.wsp-popup-root.anim-in-slide-up .wsp-dialog {
  transform: translateY(24px) scale(1);
}

.wsp-popup-root.anim-in-zoom .wsp-dialog {
  transform: scale(0.92);
}

#wsp-popup-root .wsp-close {
  all: unset;
  box-sizing: border-box !important;
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #444444 !important;
  font-family: inherit !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18) !important;
  z-index: 2 !important;
}

#wsp-popup-root .wsp-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.wsp-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--wsp-text, #0f172a);
}

.wsp-subtitle {
  margin: 0 0 20px;
  color: var(--wsp-subtitle, #475569);
}

.wsp-field {
  margin-bottom: 14px;
}

.wsp-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #334155;
}

.wsp-field input,
.wsp-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.wsp-field input:focus,
.wsp-field textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.wsp-field--checkbox label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}

.wsp-field--honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.wsp-required {
  color: #dc2626;
}

.wsp-submit,
.wsp-el-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--wsp-button-bg, #2563eb);
  color: var(--wsp-button-text, #fff);
  font-weight: 600;
  cursor: pointer;
}

.wsp-submit:hover,
.wsp-el-cta:hover {
  filter: brightness(0.9);
}

.wsp-form-message {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
}

.wsp-form-message.is-error {
  background: #fef2f2;
  color: #991b1b;
}

.wsp-calendly-inline {
  width: 100%;
  min-height: 680px;
}

.wsp-popup-root.mode-calendly .wsp-body {
  height: 100%;
}

.wsp-popup-root.mode-calendly .wsp-mode-calendly {
  height: 100%;
}

.wsp-popup-root.mode-calendly .wsp-calendly-inline {
  height: 100%;
  overflow: hidden;
}

.wsp-elementor-content .wsp-el-heading {
  margin-top: 0;
}

.wsp-elementor-content .wsp-el-cta {
  width: auto;
  margin-top: 12px;
}

@media (max-width: 767px) {
  .wsp-dialog.pos-fullscreen {
    padding-top: 48px;
  }
}
