/* ==========================================================================
   Commercium demo popup
   Left: animated sync graphic + intro copy
   Right: form (wider, no inner scrollbars)
   ========================================================================== */

#popup.cm-popup {
  --cm-pop-primary: #008CE2;
  --cm-pop-primary-soft: #2BA4EC;
  --cm-pop-navy: #113D7E;
  --cm-pop-ink: #1C1D21;
  --cm-pop-body: #353C46;
  --cm-pop-muted: #6B7785;
  --cm-pop-border: rgba(28, 29, 33, 0.1);
  --cm-pop-soft: #f4f8fc;
  --cm-pop-card: #ffffff;
  --cm-pop-dark: #0a0f1c;
  --cm-pop-heading: #F3F6FB;
  --cm-pop-aside-muted: #9AA7B8;
  --cm-pop-gradient: linear-gradient(120deg, #0D97D5 0%, #0E7CBB 48%, #113D7E 100%);
  --cm-pop-font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --cm-pop-font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --cm-pop-radius: 12px;
  --cm-pop-radius-lg: 20px;
  font-family: var(--cm-pop-font-body);
  color: var(--cm-pop-body);
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
  padding: 24px 16px;
  background-color: rgba(10, 15, 28, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#popup.cm-popup *,
#popup.cm-popup *::before,
#popup.cm-popup *::after {
  box-sizing: border-box;
}

#popup.cm-popup .stu-popup-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  margin-top: 0 !important;
  padding: 0 !important;
  max-height: none;
  overflow: visible;
  background: var(--cm-pop-card);
  border: 0;
  border-radius: var(--cm-pop-radius-lg);
  box-shadow: 0 30px 80px rgba(8, 18, 40, 0.42);
  animation: cm-popup-in 0.3s ease-out;
}

@keyframes cm-popup-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#popup.cm-popup form.form {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

#popup.cm-popup .cm-popup__layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr);
  align-items: stretch;
  min-height: 0;
  overflow: visible;
}

/* ---- Left column ---- */
#popup.cm-popup .cm-popup__visual {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
  min-height: 100%;
  padding: 28px 24px 32px 28px;
  overflow: hidden;
  background-color: var(--cm-pop-dark);
  background-image:
    radial-gradient(ellipse 80% 55% at 0% 40%, rgba(0, 140, 226, 0.28), transparent 60%),
    radial-gradient(ellipse 42% 40% at 90% 8%, rgba(17, 61, 126, 0.55), transparent 70%),
    linear-gradient(180deg, #0c1626 0%, #0a0f1c 100%);
}

#popup.cm-popup .cm-popup__visual-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  left: -80px;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 164, 236, 0.32), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

#popup.cm-popup .cm-popup__orbit {
  position: relative;
  z-index: 1;
  width: 100%;
}

#popup.cm-popup .cm-popup__orbit-stage {
  position: relative;
  width: 100%;
  max-width: none;
  height: 360px;
  margin: 0 auto;
}

#popup.cm-popup .cm-popup__orbit-stage::before {
  content: "";
  position: absolute;
  inset: 8px;
  background-image: radial-gradient(rgba(43, 164, 236, 0.18) 0.8px, transparent 0.9px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle 150px at 50% 50%, #000 42%, transparent 78%);
  mask-image: radial-gradient(circle 150px at 50% 50%, #000 42%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

#popup.cm-popup .cm-popup__orbit-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  max-width: 300px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  border: 1px dashed rgba(43, 164, 236, 0.22);
  border-top-color: rgba(43, 164, 236, 0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cm-popup-spin-ring 18s linear infinite;
}

@keyframes cm-popup-spin-ring {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

#popup.cm-popup .cm-popup__orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#popup.cm-popup .cm-popup__orbit-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1.15;
}

#popup.cm-popup .cm-popup__orbit-ring--outer {
  stroke: rgba(43, 164, 236, 0.22);
  stroke-dasharray: 4 8;
}

#popup.cm-popup .cm-popup__orbit-svg path {
  fill: none;
  stroke: rgba(43, 164, 236, 0.5);
  stroke-width: 1.35;
}

#popup.cm-popup .cm-popup__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}

#popup.cm-popup .cm-popup__hub-core {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--cm-pop-gradient);
  box-shadow:
    0 12px 32px rgba(0, 140, 226, 0.46),
    0 0 0 7px rgba(0, 140, 226, 0.1);
}

#popup.cm-popup .cm-popup__hub-core img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

#popup.cm-popup .cm-popup__hub-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(43, 164, 236, 0.4);
  pointer-events: none;
  animation: cm-popup-pulse 2.8s ease-out infinite;
}

#popup.cm-popup .cm-popup__hub-pulse--delay {
  animation-delay: 1.4s;
}

@keyframes cm-popup-pulse {
  0% { transform: scale(0.86); opacity: 0.7; }
  100% { transform: scale(1.28); opacity: 0; }
}

#popup.cm-popup .cm-popup__node {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  margin-left: -38px;
  text-align: center;
}

#popup.cm-popup .cm-popup__node-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(26, 39, 64, 0.96), rgba(16, 24, 42, 0.96));
  border: 1px solid rgba(43, 164, 236, 0.32);
  color: var(--cm-pop-primary-soft);
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

#popup.cm-popup .cm-popup__node-lab {
  color: #D5DEEA;
  font-family: var(--cm-pop-font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

#popup.cm-popup .cm-popup__node--n { top: 0; left: 50%; }
#popup.cm-popup .cm-popup__node--s { bottom: 0; left: 50%; }
#popup.cm-popup .cm-popup__node--ne { top: 18%; right: 0; left: auto; margin-left: 0; width: auto; }
#popup.cm-popup .cm-popup__node--nw { top: 18%; left: 0; margin-left: 0; width: auto; }
#popup.cm-popup .cm-popup__node--se { bottom: 16%; right: 0; left: auto; margin-left: 0; width: auto; }
#popup.cm-popup .cm-popup__node--sw { bottom: 16%; left: 0; margin-left: 0; width: auto; }

#popup.cm-popup .cm-popup__node--ne,
#popup.cm-popup .cm-popup__node--se {
  align-items: flex-end;
  text-align: right;
}

#popup.cm-popup .cm-popup__node--nw,
#popup.cm-popup .cm-popup__node--sw {
  align-items: flex-start;
  text-align: left;
}

/* Intro copy under graphic */
#popup.cm-popup .cm-popup__intro {
  position: relative;
  z-index: 1;
  text-align: left;
}

#popup.cm-popup .cm-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cm-pop-primary-soft);
  font-family: var(--cm-pop-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#popup.cm-popup .cm-popup__title,
#popup.cm-popup h2.cm-popup__title {
  width: auto !important;
  max-width: 100%;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: none !important;
  color: #fff !important;
  font-family: var(--cm-pop-font-display) !important;
  font-size: 34px !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
  line-height: 1.15 !important;
}

#popup.cm-popup .cm-popup__lede {
  max-width: 22em;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--cm-pop-aside-muted) !important;
  font-family: var(--cm-pop-font-body) !important;
  font-size: 15px !important;
  font-weight: 500;
  letter-spacing: 0 !important;
  line-height: 1.6 !important;
}

/* ---- Close ---- */
#popup.cm-popup .stu-close,
#popup.cm-popup .cm-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  float: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cm-pop-muted) !important;
  font-family: var(--cm-pop-font-body) !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

#popup.cm-popup .stu-close:hover,
#popup.cm-popup .cm-popup__close:hover {
  color: var(--cm-pop-ink) !important;
  background: var(--cm-pop-soft);
  transform: none;
}

#popup.cm-popup .stu-close:focus-visible {
  outline: 2px solid var(--cm-pop-primary-soft);
  outline-offset: 2px;
}

/* ---- Right form ---- */
#popup.cm-popup .cm-popup__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--cm-pop-card);
  overflow: visible;
}

#popup.cm-popup .popup-header,
#popup.cm-popup .cm-popup__header {
  flex-shrink: 0;
  padding: 36px 48px 0 40px !important;
  background: #fff;
  border: 0;
  text-align: left;
}

#popup.cm-popup .cm-popup__header h3 {
  margin: 0 0 6px;
  color: var(--cm-pop-ink);
  font-family: var(--cm-pop-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

#popup.cm-popup .cm-popup__header p,
#popup.cm-popup .popup-header p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--cm-pop-muted) !important;
  font-family: var(--cm-pop-font-body) !important;
  font-size: 14.5px !important;
  font-weight: 500;
  letter-spacing: 0 !important;
  line-height: 1.5 !important;
}

#popup.cm-popup form .popup-form-block,
#popup.cm-popup .cm-popup__body {
  display: block;
  overflow: visible;
  padding: 24px 48px 36px 40px !important;
}

#popup.cm-popup .cm-popup__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

#popup.cm-popup .cm-popup__field {
  width: 100%;
  padding: 0 !important;
  margin: 0 0 18px;
}

#popup.cm-popup .cm-popup__row .cm-popup__field {
  margin-bottom: 18px;
}

#popup.cm-popup .cm-popup__field > label {
  display: block;
  margin: 0 0 8px;
  color: var(--cm-pop-ink);
  font-family: var(--cm-pop-font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

#popup.cm-popup .cm-popup__req {
  color: #c0392b;
  font-weight: 700;
}

#popup.cm-popup .cm-popup__field input,
#popup.cm-popup .cm-popup__field textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 50px;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1.5px solid var(--cm-pop-border) !important;
  border-radius: var(--cm-pop-radius);
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--cm-pop-ink) !important;
  font-family: var(--cm-pop-font-body) !important;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1.45;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#popup.cm-popup .cm-popup__field textarea {
  height: auto !important;
  min-height: 148px !important;
  max-height: 148px;
  padding: 14px 16px !important;
  resize: none;
  overflow: hidden !important;
  line-height: 1.5;
}

#popup.cm-popup .cm-popup__field input::placeholder,
#popup.cm-popup .cm-popup__field textarea::placeholder {
  color: #8a96a6;
  opacity: 1;
  font-family: var(--cm-pop-font-body);
  font-size: 15px;
  font-weight: 500;
}

#popup.cm-popup .cm-popup__field input:hover,
#popup.cm-popup .cm-popup__field textarea:hover {
  border-color: rgba(0, 140, 226, 0.28) !important;
}

#popup.cm-popup .cm-popup__field input:focus,
#popup.cm-popup .cm-popup__field textarea:focus {
  border-color: var(--cm-pop-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 140, 226, 0.14) !important;
  outline: none !important;
}

#popup.cm-popup .cm-popup__field input:user-invalid,
#popup.cm-popup .cm-popup__field textarea:user-invalid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

#popup.cm-popup input[type="number"] {
  -moz-appearance: textfield;
}

#popup.cm-popup input[type="number"]::-webkit-outer-spin-button,
#popup.cm-popup input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#popup.cm-popup .cm-popup__captcha {
  width: 100%;
  max-width: 100%;
  margin: 2px 0 18px;
  overflow: hidden;
  min-height: 78px;
}

#popup.cm-popup .g-recaptcha {
  width: 304px;
  max-width: 100%;
  overflow: hidden;
  transform: none;
}

#popup.cm-popup .g-recaptcha > div,
#popup.cm-popup .g-recaptcha iframe {
  max-width: 100%;
}

#popup.cm-popup .popup-form-submit {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0 !important;
  text-align: left;
}

#popup.cm-popup .popup-form-submit input,
#popup.cm-popup .popup-form-submit input[type="submit"],
#popup.cm-popup .popup-form-submit input.w-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 28px !important;
  border: none !important;
  border-radius: var(--cm-pop-radius) !important;
  background: var(--cm-pop-gradient) !important;
  color: #fff !important;
  font-family: var(--cm-pop-font-display) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 140, 226, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

#popup.cm-popup .popup-form-submit input:hover,
#popup.cm-popup .popup-form-submit input.w-button:hover {
  color: #fff !important;
  background: var(--cm-pop-gradient) !important;
  opacity: 1;
  filter: saturate(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 140, 226, 0.4);
}

#popup.cm-popup .popup-form-submit input:focus-visible {
  outline: 2px solid var(--cm-pop-primary-soft);
  outline-offset: 3px;
}

#popup.cm-popup .popup-form-submit input:disabled,
#popup.cm-popup .popup-form-submit input.is-loading,
#popup.cm-popup .popup-form-submit.is-loading input {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  filter: none;
  pointer-events: none;
}

#popup.cm-popup form.cm-popup--submitting {
  pointer-events: none;
}

#popup.cm-popup .popup-form-submit.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: cm-popup-spin 0.7s linear infinite;
}

@keyframes cm-popup-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

#popup.cm-popup #error_message_i,
#popup.cm-popup #success_message_i {
  width: auto !important;
  margin: 24px 40px 32px !important;
  padding: 16px 18px;
  border-radius: 12px;
  text-align: left;
  font-family: var(--cm-pop-font-body);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.55;
}

#popup.cm-popup #error_message_i {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.22);
  color: #a11f2e;
}

#popup.cm-popup #error_message_i h2 {
  width: auto !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: none !important;
  color: #a11f2e !important;
  font-family: var(--cm-pop-font-display) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

#popup.cm-popup #error_message_i ul {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
}

#popup.cm-popup #success_message_i {
  background: rgba(22, 165, 113, 0.08);
  border: 1px solid rgba(22, 165, 113, 0.25);
  color: var(--cm-pop-body);
}

#popup.cm-popup #success_message_i h4 {
  margin: 0;
  color: var(--cm-pop-ink);
  font-family: var(--cm-pop-font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

#popup.cm-popup #success_message_i a {
  color: var(--cm-pop-primary);
  font-weight: 700;
}

#popup.cm-popup #success_message_i a:hover {
  color: var(--cm-pop-navy);
}

#popup.cm-popup .stu-popup-content:has(form[style*="display: none"]) {
  max-width: 520px !important;
}

#popup.cm-popup .stu-popup-content:has(form[style*="display: none"]) #success_message_i,
#popup.cm-popup .stu-popup-content:has(form[style*="display: none"]) #error_message_i {
  margin: 40px 32px !important;
}

@media (max-width: 980px) {
  #popup.cm-popup .cm-popup__layout {
    grid-template-columns: 1fr;
  }

  #popup.cm-popup .cm-popup__visual {
    gap: 14px;
    padding: 22px 24px 22px;
  }

  #popup.cm-popup .cm-popup__orbit-stage {
    height: 300px;
  }

  #popup.cm-popup .cm-popup__title,
  #popup.cm-popup h2.cm-popup__title {
    font-size: 28px !important;
  }

  #popup.cm-popup .popup-header,
  #popup.cm-popup .cm-popup__header {
    padding: 28px 28px 0 !important;
  }

  #popup.cm-popup form .popup-form-block,
  #popup.cm-popup .cm-popup__body {
    padding: 22px 28px 28px !important;
  }
}

@media (max-width: 640px) {
  #popup.cm-popup {
    padding: 8px;
  }

  #popup.cm-popup .stu-popup-content {
    border-radius: 16px;
  }

  #popup.cm-popup .cm-popup__visual {
    padding: 20px 18px 18px;
  }

  #popup.cm-popup .cm-popup__orbit-stage {
    height: 240px;
    max-width: 100%;
  }

  #popup.cm-popup .cm-popup__node--ne,
  #popup.cm-popup .cm-popup__node--nw,
  #popup.cm-popup .cm-popup__node--s {
    display: none;
  }

  #popup.cm-popup .cm-popup__title,
  #popup.cm-popup h2.cm-popup__title {
    font-size: 24px !important;
  }

  #popup.cm-popup .cm-popup__lede {
    font-size: 14px !important;
  }

  #popup.cm-popup .cm-popup__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #popup.cm-popup .popup-header,
  #popup.cm-popup .cm-popup__header {
    padding: 22px 18px 0 !important;
  }

  #popup.cm-popup .cm-popup__header h3 {
    font-size: 20px;
  }

  #popup.cm-popup form .popup-form-block,
  #popup.cm-popup .cm-popup__body {
    padding: 18px 18px 20px !important;
  }

  #popup.cm-popup .cm-popup__field,
  #popup.cm-popup .cm-popup__row .cm-popup__field {
    margin-bottom: 14px;
  }

  #popup.cm-popup .cm-popup__field textarea {
    min-height: 132px !important;
    max-height: 132px;
  }

  #popup.cm-popup .popup-form-submit input {
    height: 48px;
    font-size: 15px !important;
  }

  #popup.cm-popup .cm-popup__captcha {
    transform: scale(0.92);
    transform-origin: left top;
    min-height: 72px;
  }

  #popup.cm-popup #error_message_i,
  #popup.cm-popup #success_message_i {
    margin: 12px 18px 18px !important;
  }
}

@media (max-width: 400px) {
  #popup.cm-popup .cm-popup__captcha {
    transform: scale(0.84);
    min-height: 66px;
  }

  #popup.cm-popup .cm-popup__orbit-stage {
    height: 210px;
  }

  #popup.cm-popup .cm-popup__node-lab {
    font-size: 10px;
  }

  #popup.cm-popup .cm-popup__hub-core {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #popup.cm-popup .stu-popup-content,
  #popup.cm-popup .cm-popup__orbit-spin,
  #popup.cm-popup .cm-popup__hub-pulse,
  #popup.cm-popup .popup-form-submit input {
    animation: none;
  }

  #popup.cm-popup .cm-popup__orbit-svg circle[r="2.4"] {
    display: none;
  }

  #popup.cm-popup .popup-form-submit input:hover {
    transform: none;
  }
}
