.modal-backdrop {
    --bs-backdrop-bg: rgb(var(--dark-green));
    --bs-backdrop-opacity: 0.6;
}

.modal.modal-type-demo .modal-dialog {
    max-width: 760px;
}

.modal.modal-type-demo .modal-content {
    background-color: rgba(var(--cream), 1);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(var(--charcoal), 0.25);
}

/* GHL form needs the iframe at least 650px wide for two columns (649px drops to one). Dialog is
   760px minus 36px padding = 688px, comfortably above that. */
.modal.modal-type-demo .modal-body {
    padding: 64px 36px 40px;
}

/* Generic by element, not a .modal-title/.modal-intro class: a popup's body is now whatever
   blocks the team types (inc/popup-render.php just runs post_content through the_content), not
   a fixed heading+paragraph pair, so this has to style any heading/paragraph that shows up there
   the same way, matching the one design every popup uses (no per-popup styling settings). */
.modal.modal-type-demo .modal-body h2 {
    margin: 0;
    font-size: 36px;
    line-height: 1.2;
    text-align: center;
}

.modal.modal-type-demo .modal-body h2 + * {
    margin-top: 16px;
}

.modal.modal-type-demo .modal-body p {
    max-width: 570px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.modal.modal-type-demo .demo-form {
    margin-top: 32px;
}

/* Only the fields and the Submit button live inside this iframe. "Multiple fields" (several
   rows, e.g. the original Book a Demo form) keeps the original fixed height; "Email only" (one
   line) gets the shorter height already established for this exact case elsewhere on the site
   (components/ghl-form.css's own .ghl-form--inline) -- this modal never had that shorter variant
   before now, since every popup was the multi-field Book a Demo form until Popups existed. */
.modal.modal-type-demo .demo-form--stacked iframe {
    display: block;
    width: 100%;
    height: 552px;
    border: 0;
    border-radius: 8px;
}

.modal.modal-type-demo .demo-form--inline iframe {
    display: block;
    width: 100%;
    height: 99px;
    border: 0;
    border-radius: 8px;
}

@media (max-width: 575.98px) {
    .modal.modal-type-demo .demo-form--inline iframe {
        height: 114px;
    }
}

.modal.modal-type-demo .modal-consent {
    max-width: 570px;
    margin: 24px auto 0;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.modal.modal-type-demo .modal-consent a {
    color: rgba(var(--terra-green), 1);
    text-decoration: underline;
}

.modal.modal-type-demo .modal-consent a:hover,
.modal.modal-type-demo .modal-consent a:focus {
    color: rgba(var(--dark-green), 1);
}

/* A circle with a thin green outline, like the icons in the lifecycle section. */
.modal.modal-type-demo .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: rgba(var(--terra-green), 1);
    background-color: transparent;
    border: 1px solid rgba(var(--terra-green), 1);
    border-radius: 50%;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.modal.modal-type-demo .modal-close:hover,
.modal.modal-type-demo .modal-close:focus,
.modal.modal-type-demo .modal-close:active {
    color: rgba(var(--cream), 1);
    background-color: rgba(var(--terra-green), 1);
    border: 1px solid rgba(var(--terra-green), 1);
    box-shadow: none;
}

/* sm */
@media (max-width: 575.98px) {
    .modal.modal-type-demo .modal-body {
        padding: 64px 20px 28px;
    }

    .modal.modal-type-demo .modal-title {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal.modal-type-demo .modal-close {
        transition: none;
    }
}
