/*
 * The request form (src/_includes/start-modal.html), on any page: "Book a demo" and the
 * Done-With-You / Fractional COO options. Self-contained, so pages without site.css can use it.
 */
.ent-modal { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid #e3e8ef; border-radius: 10px; background: #fff; color: #13233d; box-shadow: 0 24px 64px rgba(19, 35, 61, 0.28); font-family: Figtree, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.ent-modal::backdrop { background: rgba(19, 35, 61, 0.45); }
.ent-modal-form { position: relative; margin: 0; }
.ent-modal-body { padding: 28px 28px 24px; }
.ent-modal h2 { margin: 0 0 6px; font-size: 22px; font-weight: 850; letter-spacing: -0.02em; }
.ent-modal-lead { margin: 0 0 18px; color: #64748b; font-size: 15px; line-height: 1.5; }
.ent-modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e3e8ef; border-radius: 7px; background: #fff; color: #475569; cursor: pointer; font-size: 16px; }
.ent-modal-x svg { width: 16px; height: 16px; }
.ent-modal-options { margin: 0 0 16px; padding: 0; border: 0; display: grid; gap: 8px; }
.ent-modal-options legend { margin: 0 0 8px; padding: 0; color: #475569; font-size: 13px; font-weight: 750; }
.ent-modal-options label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e3e8ef; border-radius: 8px; cursor: pointer; }
.ent-modal-options label:has(input:checked) { border-color: #13233d; box-shadow: inset 0 0 0 1px #13233d; }
.ent-modal-options input { margin: 3px 0 0; accent-color: #13233d; }
.ent-modal-options b { display: block; font-size: 14.5px; }
.ent-modal-options small { display: block; color: #64748b; font-size: 13px; }
.ent-field { display: block; margin: 0 0 12px; }
.ent-field span { display: block; margin: 0 0 5px; color: #475569; font-size: 13px; font-weight: 750; }
.ent-field em { color: #94a3b8; font-style: normal; font-weight: 500; }
.ent-field input, .ent-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d8dfe8; border-radius: 7px; background: #fff; color: #13233d; font: inherit; font-size: 15px; }
.ent-field input:focus, .ent-field textarea:focus { outline: 2px solid #13233d; outline-offset: -1px; border-color: #13233d; }
.ent-modal-btn { display: flex; width: 100%; height: 48px; margin-top: 4px; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: #13233d; color: #fff; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; }
.ent-modal-btn:hover { background: #22375a; }
.ent-modal-btn:disabled { opacity: 0.6; cursor: wait; }
.ent-modal [hidden] { display: none !important; }
.ent-modal *, .ent-modal *::before, .ent-modal *::after { box-sizing: border-box; }
.ent-modal svg.lucide { width: 1em; height: 1em; stroke-width: 2; }
.ent-modal-error { margin: 0 0 10px; padding: 10px 12px; border-radius: 7px; background: #fde8e8; color: #991b1b; font-size: 14px; }
.ent-modal-fine { margin: 10px 0 0; color: #94a3b8; font-size: 12.5px; text-align: center; }
.ent-modal-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ent-modal-done { text-align: center; padding-top: 40px; }
.ent-modal-done h2:focus { outline: none; }
.ent-modal-done p { margin: 0 auto 20px; max-width: 380px; color: #64748b; font-size: 15px; line-height: 1.55; }
.ent-modal-check { display: inline-flex; width: 44px; height: 44px; margin: 0 0 14px; align-items: center; justify-content: center; border-radius: 10px; background: #e3f6f2; color: #0d7566; font-size: 22px; }
.ent-modal-check svg { width: 22px; height: 22px; }


/* Scroll inside the dialog, not on its edge: the dialog clips to its rounded corners and the form
   scrolls within it, with a slim scrollbar that stops short of the corners. */
.ent-modal { overflow: hidden; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.ent-modal-form { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d1dc transparent; }
.ent-modal-form::-webkit-scrollbar { width: 8px; }
.ent-modal-form::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.ent-modal-form::-webkit-scrollbar-thumb { background: #c9d1dc; border-radius: 8px; border: 2px solid #fff; }
.ent-modal-form::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.ent-modal[open] { display: flex; flex-direction: column; }
.ent-modal-form { flex: 1 1 auto; min-height: 0; max-height: none; }

/* ---------- Polish ---------- */
/* The close button stays in the corner while the form scrolls; the title keeps clear of it. */
.ent-modal-form { position: static; }
.ent-modal-x { z-index: 2; top: 14px; right: 14px; transition: border-color 0.15s, background 0.15s; }
.ent-modal-x:hover { border-color: #13233d; background: #f6f8fb; }
.ent-modal h2 { padding-right: 40px; line-height: 1.2; text-wrap: balance; }
.ent-modal-done h2 { padding: 0 24px; }
/* Tighter, so the whole form fits a laptop screen. */
.ent-modal-body { padding: 26px 28px 22px; }
.ent-modal-lead { margin-bottom: 16px; font-size: 14.5px; }
.ent-modal-options { gap: 6px; margin-bottom: 14px; }
.ent-modal-options label { padding: 9px 12px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.ent-modal-options label:hover { border-color: #b8c3d1; }
.ent-modal-options label:has(input:checked) { background: #fbfcfe; }
.ent-modal-options label:has(input:focus-visible) { outline: 2px solid #13233d; outline-offset: 2px; }
.ent-modal-options b { font-size: 14px; }
.ent-modal-options small { font-size: 12.5px; line-height: 1.4; }
.ent-field { margin-bottom: 10px; }
.ent-field input, .ent-field textarea { padding: 9px 12px; transition: border-color 0.15s; }
.ent-field input:hover, .ent-field textarea:hover { border-color: #b8c3d1; }
.ent-field textarea { min-height: 64px; resize: vertical; }
.ent-modal-btn { transition: background 0.15s, transform 0.15s; }
.ent-modal-btn:focus-visible, .ent-modal-x:focus-visible { outline: 2px solid #13233d; outline-offset: 2px; }
/* Opens with a short fade and rise; the page behind doesn't scroll. */
@keyframes ent-modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ent-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.ent-modal[open] { animation: ent-modal-in 0.22s cubic-bezier(.23, 1, .32, 1); }
.ent-modal[open]::backdrop { animation: ent-backdrop-in 0.22s ease-out; }
.ent-modal-done:not([hidden]) { animation: ent-modal-in 0.25s cubic-bezier(.23, 1, .32, 1); }
html:has(.ent-modal[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ent-modal[open], .ent-modal[open]::backdrop, .ent-modal-done:not([hidden]) { animation: none; } }
@media (max-width: 480px) {
  .ent-modal-body { padding: 22px 18px 18px; }
  .ent-modal h2 { font-size: 20px; }
}
/* Two options per row when there is room, so the form fits without scrolling. */
@media (min-width: 560px) {
  .ent-modal-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ent-modal-options legend { grid-column: 1 / -1; }
  .ent-modal-options label { align-items: flex-start; }
}
