/* ==========================================================================
   Request a Demo Popup (#levit-popup-5040)

   Self-contained styles for the header "Request a Demo" modal. Overrides the
   Levit popup plugin defaults and skins the HubSpot form + client logos
   marquee. Scoped to #levit-popup-5040 to avoid affecting other popups.
   ========================================================================== */

/* ---------- Overlay ---------- */
.levit-popup-container#levit-popup-5040 {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(13, 25, 38, 0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.levit-popup-container#levit-popup-5040.toggled {
    display: flex;
    opacity: 1;
}

/* ---------- Modal card ---------- */
#levit-popup-5040 .levit-popup-wrapper {
    position: relative;
    width: 100%;
    max-width: 730px;
    min-width: 0;
    max-height: calc(100vh - 48px);
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden auto;
    box-shadow: 0 30px 80px rgba(13, 25, 38, 0.35),
                0 8px 24px rgba(13, 25, 38, 0.15);
    transform: translateY(16px);
    transition: transform 0.3s ease;
}

#levit-popup-5040.toggled .levit-popup-wrapper {
    transform: translateY(0);
}

/* Subtle scrollbar */
#levit-popup-5040 .levit-popup-wrapper::-webkit-scrollbar {
    width: 8px;
}
#levit-popup-5040 .levit-popup-wrapper::-webkit-scrollbar-thumb {
    background: #d7d8d9;
    border-radius: 4px;
}
#levit-popup-5040 .levit-popup-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- Inner layout ---------- */
#levit-popup-5040 .r-demo-popup {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
}

/* ---------- Close button ---------- */
#levit-popup-5040 .close-btn-form-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    margin: 0;
    padding: 0;
    display: block;
}

#levit-popup-5040 .wp-block-custom-close-popup {
    display: inline-flex;
}

#levit-popup-5040 .levit-close-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #0D1926;
    text-decoration: none;
    background: #F4F6F8;
    border: 1px solid #eeeeee;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#levit-popup-5040 .levit-close-popup-button:hover {
    background: #0D1926;
    border-color: #0D1926;
    color: #ffffff;
    transform: rotate(90deg);
}

#levit-popup-5040 .levit-close-popup-button:focus-visible {
    outline: 2px solid #1F6C6D;
    outline-offset: 2px;
}

/* ---------- Form section ---------- */
#levit-popup-5040 .r-demo-popup > .wp-block-group:nth-child(2) {
    padding: 56px 56px 0;
    margin: 0;
}

#levit-popup-5040 .hbspt-form,
#levit-popup-5040 .hs-form {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: none;
}

#levit-popup-5040 .hs-form fieldset {
    max-width: none;
    margin: 0 0 18px 0;
    padding: 0;
    border: 0;
}

#levit-popup-5040 .hs-form fieldset:last-of-type {
    margin-bottom: 0;
}

/* Heading (fieldset.form-columns-0 with h2) */
#levit-popup-5040 .hs-form h2 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 33px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    color: #0D1926 !important;
    margin: 0 0 28px !important;
    padding: 0;
    text-align: center !important;
}

#levit-popup-5040 .hs-form h2 strong,
#levit-popup-5040 .hs-form h2 span {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    background: transparent !important;
    text-decoration: none !important;
    vertical-align: baseline !important;
}

/* Two-column row */
#levit-popup-5040 .hs-form .form-columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#levit-popup-5040 .hs-form .form-columns-1 {
    display: grid;
    grid-template-columns: 1fr;
}

#levit-popup-5040 .hs-form .form-columns-0 {
    display: block;
    text-align: center;
}

/* Field container */
#levit-popup-5040 .hs-form .hs-form-field {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    margin: 0;
    padding: 0;
    float: none !important;
}

#levit-popup-5040 .hs-form .hs-form-field > label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #0D1926;
}

#levit-popup-5040 .hs-form .hs-form-required {
    margin-left: 2px;
    color: #FD604A;
    font-weight: 500;
}

#levit-popup-5040 .hs-form .hs-form-field .input {
    margin: 0;
}

/* Inputs */
#levit-popup-5040 .hs-form .hs-input {
    width: 100% !important;
    height: 44px;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #0D1926;
    background: #ffffff;
    border: 1px solid #E4E7EB;
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#levit-popup-5040 .hs-form .hs-input::placeholder {
    color: #9AA1A9;
}

#levit-popup-5040 .hs-form .hs-input:hover {
    border-color: #cbd0d6;
}

#levit-popup-5040 .hs-form .hs-input:focus {
    outline: none;
    border-color: #1F6C6D;
    box-shadow: 0 0 0 3px rgba(31, 108, 109, 0.14);
}

#levit-popup-5040 .hs-form .hs-input.invalid.error,
#levit-popup-5040 .hs-form .hs-input.error {
    border-color: #b42318;
}

#levit-popup-5040 .hs-form .hs-input.invalid.error:focus,
#levit-popup-5040 .hs-form .hs-input.error:focus {
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}

/* Textarea */
#levit-popup-5040 .hs-form textarea.hs-input {
    min-height: 96px;
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}

/* Error messages */
#levit-popup-5040 .hs-form .hs-error-msgs {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

#levit-popup-5040 .hs-form .hs-error-msg {
    font-size: 12px;
    font-weight: 400;
    color: #b42318;
}

/* Consent / helper text (non-heading rich text) */
#levit-popup-5040 .hs-form .hs-richtext > span {
    display: block !important;
    margin: 4px 0 16px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
    color: #626263 !important;
}

#levit-popup-5040 .hs-form .hs-richtext a {
    color: #1F6C6D;
    text-decoration: underline;
}

#levit-popup-5040 .hs-form .hs-richtext a:hover {
    color: #195657;
}

/* Submit button â€” primary orange CTA */
#levit-popup-5040 .hs-form .hs-submit {
    margin-top: 8px;
}

#levit-popup-5040 .hs-form .hs-submit .actions {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

#levit-popup-5040 .hs-form .hs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 52px;
    padding: 0 32px;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: linear-gradient(135deg, #FF9974 0%, #FF5212 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(253, 96, 74, 0.28);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 180px;
    margin: auto;
}

#levit-popup-5040 .hs-form .hs-button:hover {
    opacity: 0.96;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(253, 96, 74, 0.34);
}

#levit-popup-5040 .hs-form .hs-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(253, 96, 74, 0.26);
}

#levit-popup-5040 .hs-form .hs-button:focus-visible {
    outline: 2px solid #FF5212;
    outline-offset: 3px;
}

/* Hide HubSpot iframe helper */
#levit-popup-5040 .hs-form iframe[name^="target_iframe_"] {
    display: none !important;
}

/* ---------- Logos marquee ---------- */
#levit-popup-5040 .home-hero-ribbon__marquee-pre-container {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin: 40px 0 0;
    padding: 24px 0;
    background: #F4F6F8;
    border-top: 1px solid #eeeeee;
    overflow: hidden;
}

#levit-popup-5040 .home-hero-ribbon__marquee-container {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: 200%;
    height: 56px;
    gap: 0;
    background: transparent !important;
}

/* Fade edges */
#levit-popup-5040 .home-hero-ribbon__marquee-pre-container::before,
#levit-popup-5040 .home-hero-ribbon__marquee-pre-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

#levit-popup-5040 .home-hero-ribbon__marquee-pre-container::before {
    left: 0;
    background: linear-gradient(to right, #F4F6F8, rgba(244, 246, 248, 0));
}

#levit-popup-5040 .home-hero-ribbon__marquee-pre-container::after {
    right: 0;
    background: linear-gradient(to left, #F4F6F8, rgba(244, 246, 248, 0));
}

#levit-popup-5040 .home-hero-ribbon__marquee {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 56px;
    padding-right: 56px;
    flex-shrink: 0;
    background: transparent !important;
    animation: obRequestDemoMarquee 28s linear infinite;
}

#levit-popup-5040 .home-hero-ribbon__marquee-pre-container:hover .home-hero-ribbon__marquee {
    animation-play-state: paused;
}

#levit-popup-5040 .home-hero-ribbon__marquee .wp-block-safe-svg-svg-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

#levit-popup-5040 .home-hero-ribbon__marquee .safe-svg-inside {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0;
    background: transparent !important;
}

#levit-popup-5040 .home-hero-ribbon__marquee svg {
    display: block;
    width: auto;
    height: 36px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

#levit-popup-5040 .home-hero-ribbon__marquee .wp-block-safe-svg-svg-icon:hover svg {
    opacity: 1;
}

@keyframes obRequestDemoMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% - 56px)); }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
    #levit-popup-5040 .r-demo-popup > .wp-block-group:nth-child(2) {
        padding: 52px 40px 0;
    }

    #levit-popup-5040 .hs-form h2 {
        font-size: 26px !important;
        margin-bottom: 24px !important;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .levit-popup-container#levit-popup-5040 {
        padding: 12px;
        align-items: flex-start;
    }

    #levit-popup-5040 .levit-popup-wrapper {
        max-height: calc(100vh - 24px);
        border-radius: 12px;
    }

    #levit-popup-5040 .close-btn-form-popup {
        top: 14px;
        right: 14px;
    }

    #levit-popup-5040 .levit-close-popup-button {
        width: 32px;
        height: 32px;
    }

    #levit-popup-5040 .r-demo-popup > .wp-block-group:nth-child(2) {
        padding: 48px 24px 0;
    }

    #levit-popup-5040 .hs-form h2 {
        font-size: 22px !important;
        margin-bottom: 20px !important;
    }

    #levit-popup-5040 .hs-form fieldset {
        margin-bottom: 14px;
    }

    #levit-popup-5040 .hs-form .form-columns-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #levit-popup-5040 .hs-form .hs-submit .actions {
        justify-content: stretch;
    }

    #levit-popup-5040 .hs-form .hs-button {
        width: 100%;
        min-width: 0;
        height: 48px;
    }

    #levit-popup-5040 .home-hero-ribbon__marquee-pre-container {
        margin-top: 28px;
        padding: 18px 0;
    }

    #levit-popup-5040 .home-hero-ribbon__marquee {
        gap: 40px;
        padding-right: 40px;
        animation-duration: 22s;
    }

    #levit-popup-5040 .home-hero-ribbon__marquee svg {
        height: 28px;
    }

    @keyframes obRequestDemoMarquee {
        from { transform: translateX(0); }
        to   { transform: translateX(calc(-100% - 40px)); }
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    #levit-popup-5040 .home-hero-ribbon__marquee {
        animation: none;
    }

    #levit-popup-5040 .levit-popup-wrapper,
    #levit-popup-5040 .levit-close-popup-button,
    #levit-popup-5040 .hs-form .hs-button {
        transition: none;
    }
}
