/* Step-by-step lead form (app/Views/components/lead-form.php + public/js/lead-form.js).
   Self-contained: does not depend on tailwind.compiled.css, so it works on any page. */
.plf {
    --plf-brand: #4527A0;
    --plf-brand-deep: #1A237E;
    --plf-fg: #1C1A2B;
    --plf-muted: #5E5A73;
    --plf-line: #DCD8EA;
    --plf-tint: #EEEAFB;
    --plf-surface: #FFFFFF;
    --plf-ok: #1F7A4D;
    --plf-err: #B3261E;
    background: var(--plf-surface);
    color: var(--plf-fg);
    border: 1px solid var(--plf-line);
    border-radius: 16px;
    box-shadow: 0 12px 40px -18px rgba(40, 20, 110, .35);
    padding: 20px 20px 16px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    scroll-margin-top: 12px;
    container-type: inline-size;
}
.plf *, .plf *::before, .plf *::after { box-sizing: border-box; }

.plf-bar { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.plf-back { font: inherit; font-size: 14px; background: none; border: 0; color: var(--plf-muted); cursor: pointer; padding: 4px 0; }
.plf-back:disabled { visibility: hidden; }
.plf-track { flex: 1; height: 6px; background: var(--plf-tint); border-radius: 99px; overflow: hidden; }
.plf-fill { height: 100%; background: var(--plf-brand); border-radius: 99px; transition: width .35s ease; }
.plf-count { font-size: 12px; color: var(--plf-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.plf-stage { flex: 1; margin-top: 14px; }
.plf-fwd { animation: plf-in .28s ease both; }
.plf-rev { animation: plf-in-rev .28s ease both; }
@keyframes plf-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes plf-in-rev { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.plf-started { font-size: 12px; color: var(--plf-ok); margin: 0 0 8px; }
.plf .plf-q { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--plf-fg); margin: 0 0 6px; text-wrap: balance; outline: none; }
.plf-hint { color: var(--plf-muted); font-size: 14px; margin: 0 0 16px; min-height: 1em; }

.plf-opts { display: grid; gap: 10px; }
.plf-opt { font: inherit; text-align: left; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px; border: 1.5px solid var(--plf-line); border-radius: 12px; background: var(--plf-surface); color: var(--plf-fg); cursor: pointer; transition: border-color .15s, background-color .15s; }
.plf-opt:hover { border-color: var(--plf-brand); }
.plf-opt[aria-checked="true"] { border-color: var(--plf-brand); background: var(--plf-tint); }
.plf-label { flex: 1 1 0; min-width: 0; }
.plf-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--plf-line); }
.plf-opt[aria-checked="true"] .plf-dot { border: 5px solid var(--plf-brand); }
.plf-opt-quiet { border-style: dashed; color: var(--plf-muted); }
.plf-note { margin-left: auto; color: var(--plf-muted); font-size: 12px; text-align: right; }

.plf-field { display: grid; gap: 6px; margin-bottom: 14px; }
.plf-field label { font-weight: 600; font-size: 14px; }
.plf-field input { font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--plf-line); border-radius: 10px; background: var(--plf-surface); color: var(--plf-fg); width: 100%; }
.plf-field input:focus { border-color: var(--plf-brand); outline: 3px solid rgba(69, 39, 160, .22); outline-offset: 0; }
.plf-bad input { border-color: var(--plf-err); }
.plf-good input { border-color: var(--plf-ok); }
.plf-msg { font-size: 13px; color: var(--plf-err); }
.plf-form-err { margin: 0 0 10px; }

.plf-primary { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 16px; width: 100%; padding: 15px 18px; border: 0; border-radius: 12px; background: var(--plf-brand); color: #fff; cursor: pointer; margin-top: 4px; }
.plf-opts + .plf-primary { margin-top: 14px; }
.plf-primary:hover { background: var(--plf-brand-deep); }
.plf-primary:disabled { opacity: .6; cursor: progress; }

.plf-plan { border-top: 1px solid var(--plf-line); margin-top: 16px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plf-plan[hidden] { display: none; }
.plf-plan b { font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--plf-muted); margin-right: 4px; }
.plf-chip { font-size: 12.5px; background: var(--plf-tint); border-radius: 99px; padding: 3px 10px; animation: plf-pop .25s ease both; }
@keyframes plf-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

.plf-done-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--plf-tint); color: var(--plf-brand); display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.plf-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.plf-summary li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--plf-line); padding-bottom: 6px; }
.plf-summary span:first-child { color: var(--plf-muted); }
.plf-summary span:last-child { font-weight: 600; text-align: right; }
.plf-cal { margin-top: 16px; min-height: 640px; }
/* Phones book in Calendly's full-screen popup; the inline box stays empty. */
.plf-cal.plf-cal-popup { min-height: 0; margin: 0; }
.plf-cal-open { margin-top: 16px; }
.plf-cal-booked { margin-top: 16px; font-weight: 600; color: var(--plf-ok); }

.plf-ts:empty { display: none; }
.plf-ts { margin-top: 8px; }
/* Risk reducer under the submit button (30-day trial). */
.plf-trust { font-size: 13px; font-weight: 600; color: #374151; margin: 10px 0 0; text-align: center; }
.plf-trust::before { content: '✓ '; color: var(--plf-ok); }
.plf :focus-visible { outline: 3px solid var(--plf-brand); outline-offset: 2px; }
.plf .plf-q:focus, .plf .plf-q:focus-visible { outline: none; }

@media (max-width: 480px) {
    .plf { padding: 16px 16px 12px; min-height: 430px; }
    .plf .plf-q { font-size: 20px; }
    /* Smart-default note drops under the answer instead of squeezing it */
    .plf-opt { flex-wrap: wrap; row-gap: 2px; }
    .plf-note { flex-basis: 100%; margin-left: 30px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    .plf-fwd, .plf-rev, .plf-chip { animation: none; }
    .plf-fill { transition: none; }
}

/* Compact first step (layout 'compact'): a slim contact strip that expands
   into the full card after Continue. Fields sit side by side when the form
   is wide enough (homepage), stacked in a narrow column or on phones. */
.plf.plf-compact { min-height: 0; padding: 16px 18px 6px; }
.plf-compact .plf-bar, .plf-compact .plf-started, .plf-compact .plf-plan { display: none; }
.plf-compact .plf-stage { margin-top: 0; }
.plf-compact .plf-q { font-size: 19px; margin-bottom: 2px; }
.plf-compact .plf-hint { margin-bottom: 12px; }
.plf-compact .plf-field { margin-bottom: 10px; gap: 4px; }
.plf-compact .plf-field label { font-size: 13px; }
.plf-compact .plf-field input { padding: 10px 12px; }
.plf-fields { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 12px; }
@container (min-width: 640px) {
    .plf-compact .plf-fields { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* In a wide slot (homepage) the strip spans the row; once expanded, the
   question card narrows to a comfortable reading width. */
.plf-wide .plf:not(.plf-compact) { max-width: 36rem; margin-inline: auto; }

/* ---- Sticky dock (component option 'sticky') -------------------------- */
/* Cloudflare check: only visible if it needs a click; kept clear of the dock */
.plf-ts { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 70; }
.plf-placeholder { visibility: hidden; }
.plf-dock { position: fixed; z-index: 60; }
.plf-dock[hidden], .plf-dock-cta[hidden], .plf-dock-backdrop[hidden] { display: none; }
.plf-dock-close {
    position: absolute; top: 6px; right: 8px; z-index: 2;
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: transparent; color: #5E5A73; font-size: 24px; line-height: 1; cursor: pointer;
}
.plf-dock-close:hover { background: #EEEAFB; }
.plf-dock .plf { box-shadow: none; border: 0; border-radius: inherit; }

/* Desktop: pop-up panel in the bottom-right corner */
.plf-dock-panel {
    right: 24px; bottom: 24px; width: min(420px, calc(100vw - 48px));
    max-height: calc(100vh - 48px); overflow: auto;
    background: #fff; border: 1px solid #DCD8EA; border-top: 5px solid #4527A0; border-radius: 16px;
    box-shadow: 0 24px 60px -18px rgba(40, 20, 110, .55);
    animation: plf-dock-up .3s ease both;
}
.plf-dock-panel .plf.plf-compact { padding: 16px 18px 8px; }

/* Phones: bar that opens the bottom sheet */
.plf-dock-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    border: 0; width: 100%;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 16px;
    color: #fff; background: #4527A0;
    padding: 15px 16px calc(15px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 18px rgba(26, 35, 126, .3);
    cursor: pointer;
    animation: plf-dock-up .3s ease both;
}
.plf-dock-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(18, 16, 32, .45); }
.plf-dock-sheet {
    left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto;
    background: #fff; border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: plf-dock-up .3s ease both;
}
.plf-dock-sheet .plf { padding-top: 22px; }
html.plf-sheet-open body { position: fixed; left: 0; right: 0; overflow: hidden; }
@keyframes plf-dock-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .plf-dock-panel, .plf-dock-cta, .plf-dock-sheet { animation: none; }
}

/* Desktop, after the visitor closes the bar: a small button to reopen it */
.plf-dock-cta.plf-dock-cta-pill {
    left: auto; right: 24px; bottom: 24px; width: auto;
    border-radius: 99px; padding: 12px 22px; font-size: 15px;
    box-shadow: 0 10px 30px -10px rgba(26, 35, 126, .55);
}


/* Optional phone step: quiet "No thanks" under the main button */
.plf-skip { font: inherit; font-size: 14px; display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; background: none; color: #5E5A73; text-decoration: underline; cursor: pointer; }
.plf-skip:hover { color: #1C1A2B; }

/* ---- Big purple "Book a demo" button (components/book-demo-button) ------ */
.pv-cta-btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 1.05rem;
    color: #fff; background: #4527A0; border-radius: .75rem; padding: .95rem 2.25rem;
    text-decoration: none; box-shadow: 0 12px 28px -12px rgba(69, 39, 160, .75);
    transition: background-color .15s, transform .15s;
}
.pv-cta-btn:hover { background: #1A237E; color: #fff; transform: translateY(-1px); }
/* Pulled up into the previous section's bottom padding (sections end with
   at least 4rem), so it sits on that section's background with no extra band. */
.pv-cta-row { display: flex; justify-content: center; padding: 0 1rem; margin-top: -4.25rem; margin-bottom: .75rem; position: relative; z-index: 1; }
@media (max-width: 1023px) {
    .pv-cta-row .pv-cta-btn { width: 100%; max-width: 22rem; }
}
/* Homepage only: purple "Book a demo" next to the menu button on phones/tablets */
.pv-header-demo {
    display: inline-flex; align-items: center; font-weight: 700; font-size: .9rem; color: #fff;
    background: #4527A0; border-radius: .5rem; padding: .45rem .85rem; margin: 0 .5rem 0 auto;
    text-decoration: none; white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(69, 39, 160, .6);
}
.pv-header-demo:hover { background: #1A237E; color: #fff; }
@media (min-width: 1280px) { .pv-header-demo { display: none; } }
/* Make room for it: the site logo is sized for a header with only the menu button */
@media (max-width: 1279px) {
    header:has(.pv-header-demo) a > img { max-width: 132px; height: auto; }
    header:has(.pv-header-demo) nav { padding-left: 12px; padding-right: 8px; }
}
@media (max-width: 360px) {
    header:has(.pv-header-demo) a > img { max-width: 108px; }
    .pv-header-demo { font-size: .8rem; padding: .4rem .6rem; }
}

/* ---- Hero "Book a demo" + risk reducers (components/hero-demo-cta) ------- */
.pv-hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; margin-top: .75rem; margin-bottom: 1.5rem; }
.pv-hero-trust { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; font-size: .85rem; font-weight: 600; color: #374151; }
.pv-hero-trust span::before { content: '\2713\00a0'; color: #16A34A; }
@media (max-width: 1023px) {
    /* Room before the "Trusted by" logo strip that follows on phones. */
    .pv-hero-cta { align-items: stretch; margin-bottom: 3rem; }
    .pv-hero-trust { justify-content: center; }
}
