:root {
    --cdp-cyan: #28c8dc;
    --cdp-blue: #087dcc;
    --cdp-navy: #102a4b;
    --cdp-text: #193453;
    --cdp-muted: #64748b;
    --cdp-line: #d7e8f1;
  }

  /* Prevent the website behind the popup from scrolling. */
  html:has(body.cdp-popup-lock),
  body.cdp-popup-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .cdp-popup,
  .cdp-popup * {
    box-sizing: border-box;
    font-family: sans-serif;
  }

  .cdp-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
  }
  .cdp-brand img {
  display: block;
  width: 138px;
  max-height: 46px;
  object-fit: contain;
  object-position: left center;
  margin-left: -35px;
}
  .cdp-popup.cdp-show {
    opacity: 1;
    visibility: visible;
  }

  .cdp-popup-overlay {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 50% 15%, rgba(20, 132, 178, .22), transparent 46%),
      rgba(4, 16, 30, .85);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
  }

  /* Single-column dialog like the reference design. */
  .cdp-popup-dialog {
    position: relative;
    isolation: isolate;
    width: min(430px, calc(100vw - 24px));
    max-height: calc(100dvh - 28px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(96, 216, 233, .75);
    border-radius: 26px;
    background:
      radial-gradient(circle at 85% 6%, rgba(190, 240, 250, .85) 0 6%, transparent 34%),
      radial-gradient(circle at 8% 96%, rgba(160, 228, 242, .55), transparent 40%),
      linear-gradient(160deg, #f2fcff 0%, #e3f5fb 46%, #d5eef7 100%);
    box-shadow:
      0 0 0 3px rgba(40, 200, 220, .14),
      0 0 34px rgba(40, 200, 220, .45),
      0 30px 90px rgba(0, 16, 32, .55);
    transform: translateY(38px) scale(.94);
    opacity: 0;
    transition:
      transform .55s cubic-bezier(.18, .9, .2, 1),
      opacity .35s ease;
  }

  .cdp-popup.cdp-show .cdp-popup-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  /* Soft floating bubbles in the card background. */
  .cdp-popup-dialog::before,
  .cdp-popup-dialog::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
  }

  .cdp-popup-dialog::before {
    width: 14px;
    height: 14px;
    right: 34px;
    top: 42%;
    background: rgba(60, 205, 226, .55);
    box-shadow:
      -350px 90px 0 -3px rgba(60, 205, 226, .40),
      -40px 330px 0 -5px rgba(60, 205, 226, .35),
      -310px -60px 0 -6px rgba(255, 255, 255, .8);
    animation: cdpBubbleFloat 7s ease-in-out infinite;
  }

  .cdp-popup-dialog::after {
    width: 240px;
    height: 240px;
    left: -120px;
    top: -120px;
    border: 1px solid rgba(29, 183, 213, .18);
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .10);
  }

  /* Scrolls only when the screen is shorter than the popup. */
  .cdp-popup-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 24px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(40, 200, 220, .45) transparent;
  }

  .cdp-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 30;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #123858;
    background: rgba(255, 255, 255, .92);
    box-shadow:
      0 8px 22px rgba(17, 66, 93, .16),
      0 0 0 1px rgba(40, 200, 220, .16);
    transition:
      transform .25s ease,
      background .25s ease,
      color .25s ease,
      box-shadow .25s ease;
  }

  .cdp-popup-close:hover {
    transform: rotate(90deg) scale(1.05);
    color: #fff;
    background: linear-gradient(135deg, var(--cdp-cyan), var(--cdp-blue));
    box-shadow: 0 8px 24px rgba(8, 125, 204, .30);
  }

  .cdp-popup-close svg {
    width: 18px;
    height: 18px;
  }

  /* Cloud Dreams logo (inline SVG wordmark). */
  .cdp-brand {
    min-height: 46px;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    animation: cdpFadeDown .6s .15s ease both;
  }

  .cdp-brand svg {
    display: block;
    width: 138px;
    height: auto;
  }

  /* Header row: heading text on the left, rocket on the right. */
  .cdp-popup-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 96px;
    column-gap: 12px;
    align-items: start;
    margin-bottom: 16px;
  }

  .cdp-popup-title {
    margin: 0;
    color: var(--cdp-navy);
    font-size: clamp(21px, 5.4vw, 26px);
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -.5px;
    animation: cdpFadeUp .65s .22s ease both;
  }

  .cdp-popup-title strong {
    display: block;
    color: #08add0;
    font-weight: 800;
  }

  .cdp-popup-copy {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    color: #40607a;
    font-size: 12px;
    line-height: 1.55;
    animation: cdpFadeUp .65s .3s ease both;
  }

  .cdp-popup-copy b {
    color: #14506e;
    font-weight: 700;
  }

  .cdp-rocket {
    width: 96px;
    margin-top: 2px;
    filter: drop-shadow(0 12px 14px rgba(15, 97, 138, .22));
    animation: cdpRocketFloat 3.8s ease-in-out infinite;
  }

  .cdp-rocket svg {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Form */
  .cdp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 10px;
  }

  .cdp-field {
    min-width: 0;
  }

  .cdp-field-full {
    grid-column: 1 / -1;
  }

  .cdp-field label {
    display: block;
    margin: 0 0 5px;
    color: #263d55;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 700;
  }

  .cdp-input-wrap {
    position: relative;
  }

  .cdp-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 15px;
    height: 15px;
    color: #13add0;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .cdp-textarea-icon {
    top: 12px;
    transform: none;
  }

  .cdp-field input,
  .cdp-field select,
  .cdp-field textarea {
    display: block;
    width: 100%;
    margin: 0;
    border: 1px solid var(--cdp-line);
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #243b53;
    font-family: inherit;
    font-size: 11.5px;
    box-shadow: 0 3px 10px rgba(16, 80, 112, .04);
    transition:
      border-color .22s ease,
      box-shadow .22s ease,
      transform .22s ease;
  }

  .cdp-field input,
  .cdp-field select {
    height: 42px;
    padding: 0 10px 0 33px;
  }

  .cdp-field select {
    appearance: auto;
    padding-right: 24px;
  }

  .cdp-field textarea {
    min-height: 76px;
    resize: none;
    padding: 11px 11px 11px 33px;
    line-height: 1.4;
  }

  .cdp-field input:focus,
  .cdp-field select:focus,
  .cdp-field textarea:focus {
    border-color: var(--cdp-cyan);
    box-shadow:
      0 0 0 3px rgba(40, 200, 220, .13),
      0 5px 14px rgba(22, 161, 191, .09);
    transform: translateY(-1px);
  }

  .cdp-file-control {
    position: relative;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px 5px 33px;
    overflow: hidden;
    border: 1px solid var(--cdp-line);
    border-radius: 10px;
    background: #fff;
  }

  .cdp-file-control input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .cdp-file-button {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 7px 9px;
    border: 1px solid #c8dce7;
    border-radius: 7px;
    cursor: pointer;
    color: #23445e !important;
    background: #eef7fb;
    font-size: 9.5px !important;
    font-weight: 700 !important;
  }

  .cdp-file-name {
    min-width: 0;
    overflow: hidden;
    color: #65798b;
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Pill gradient button like the reference. */
  .cdp-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(100deg, #20c9d7 0%, #0fadd4 55%, #087bcc 100%);
    background-size: 180% 180%;
    box-shadow: 0 12px 24px rgba(6, 154, 202, .28);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2px;
    animation: cdpButtonGradient 4s ease infinite;
    transition:
      transform .22s ease,
      box-shadow .22s ease;
  }

  .cdp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(6, 154, 202, .38);
  }

  .cdp-submit-arrow {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .22);
    transition: transform .22s ease;
  }

  .cdp-submit:hover .cdp-submit-arrow {
    transform: translateX(4px);
  }

  .cdp-submit-arrow svg {
    width: 14px;
    height: 14px;
  }

  .cdp-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 0;
    color: #728394;
    font-size: 9px;
    line-height: 1.3;
    text-align: center;
  }

  .cdp-privacy svg {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    color: #11afc7;
  }

  /* Mobile: single-column fields, compact spacing. */
  @media (max-width: 480px) {
    .cdp-popup {
      padding: 9px;
    }

    .cdp-popup-dialog {
      width: calc(100vw - 18px);
      max-height: calc(100dvh - 18px);
      border-radius: 22px;
    }

    .cdp-popup-scroll {
      padding: 18px 16px 16px;
    }

    .cdp-popup-close {
      top: 11px;
      right: 11px;
      width: 34px;
      height: 34px;
    }

    .cdp-brand {
      min-height: 38px;
      margin-bottom: 10px;
    }

    .cdp-brand img {
  width: 112px;
  max-height: 38px;
}

    .cdp-popup-head {
      grid-template-columns: 1fr 70px;
      margin-bottom: 13px;
    }

    .cdp-popup-title {
      font-size: clamp(19px, 6vw, 22px);
    }

    .cdp-popup-copy {
      font-size: 10.5px;
    }

    .cdp-rocket {
      width: 70px;
    }

    .cdp-form-grid {
      grid-template-columns: 1fr;
      gap: 9px;
    }

    .cdp-field input,
    .cdp-field select {
      height: 40px;
      font-size: 11px;
    }

    .cdp-field textarea {
      min-height: 66px;
      font-size: 11px;
    }

    .cdp-submit {
      min-height: 45px;
      font-size: 12px;
    }
  }

  /* Short screens / landscape phones: shrink header so form stays reachable. */
  @media (max-height: 620px) {
    .cdp-popup-scroll {
      padding-top: 16px;
    }

    .cdp-brand {
      min-height: 32px;
      margin-bottom: 8px;
    }

    .cdp-popup-copy {
      display: none;
    }

    .cdp-rocket {
      width: 62px;
    }

    .cdp-field textarea {
      min-height: 58px;
    }
  }

  @keyframes cdpFadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes cdpFadeUp {
    from { opacity: 0; transform: translateY(13px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes cdpRocketFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-8px) rotate(2deg); }
  }

  @keyframes cdpBubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  @keyframes cdpButtonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  @media (prefers-reduced-motion: reduce) {
    .cdp-popup *,
    .cdp-popup *::before,
    .cdp-popup *::after {
      animation: none !important;
      transition-duration: .01ms !important;
    }
  }
