/* TVA Leads — enquiry form. Scoped under .tvl-* so theme styles don't leak in. */
.tvl-root, .tvl-overlay, .tvl-launcher {
  --tvl-accent: #0072c6;
  --tvl-accent-2: #005bb5;
  --tvl-ink: #1a3a52;
  --tvl-muted: #4a7a9b;
  --tvl-line: #c4dded;
  --tvl-soft: #eaf4fb;
  --tvl-card: #ffffff;
  --tvl-wa: #25D366;
  --tvl-wa-ink: #0b3d1f;
  --tvl-danger: #b42318;
  --tvl-radius: 14px;
  --tvl-font: var(--font-body, 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  --tvl-font-head: var(--font-head, 'Space Grotesk', system-ui, sans-serif);
}
.tvl-root, .tvl-root * , .tvl-overlay, .tvl-overlay * { box-sizing: border-box; }
.tvl-root { font-family: var(--tvl-font); color: var(--tvl-ink); font-size: 15px; line-height: 1.45; text-align: left; }
.tvl-root button, .tvl-root input, .tvl-root select, .tvl-root textarea, .tvl-launcher, .tvl-overlay button {
  font-family: inherit; font-size: inherit; letter-spacing: normal; text-transform: none; margin: 0; box-shadow: none; min-height: 0; line-height: 1.3;
}
.tvl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── Inline section (shortcode + every-page form) ── */
.tvl-inline { max-width: 620px; margin: 48px auto; padding: 0 16px; clear: both; }
.tvl-inline-head { text-align: center; margin-bottom: 18px; }
.tvl-inline .tvl-inline-title { font-family: var(--font-head, 'Space Grotesk', system-ui, sans-serif); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; margin: 0 0 8px; color: #1a3a52; }
.tvl-inline .tvl-inline-sub { color: #4a7a9b; margin: 0 auto; max-width: 560px; font-size: 1rem; }
.tvl-inline .tvl-root { background: var(--tvl-card); border: 1px solid var(--tvl-line); border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 76, 140, .08); overflow: hidden; }
.tvl-noscript { display: block; padding: 18px; text-align: center; }

/* ── Buttons ── */
.tvl-root .tvl-btn, .tvl-overlay .tvl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 13px 18px; border-radius: 999px; font-weight: 700; font-family: var(--tvl-font-head); font-size: .95rem;
  text-decoration: none !important; transition: transform .15s, box-shadow .15s, background .15s; flex: 1 1 auto;
}
.tvl-root .tvl-btn:hover { transform: translateY(-1px); }
.tvl-root .tvl-btn-wa { background: var(--tvl-wa); color: var(--tvl-wa-ink) !important; box-shadow: 0 6px 18px rgba(37, 211, 102, .35); }
.tvl-root .tvl-btn-wa:hover { background: #20bd5a; }
.tvl-root .tvl-btn-primary { background: linear-gradient(135deg, var(--tvl-accent-2), var(--tvl-accent)); color: #fff !important; }
.tvl-root .tvl-btn-ghost { background: var(--tvl-soft); color: var(--tvl-accent-2) !important; border: 1px solid var(--tvl-line); }
.tvl-root .tvl-btn-ghost:hover { background: #ddeefa; }
.tvl-root .tvl-btn[disabled] { opacity: .6; cursor: default; transform: none; }
.tvl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ── Inputs ── */
.tvl-root .tvl-input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--tvl-line); border-radius: 12px; background: #fff; color: var(--tvl-ink);
  outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; height: auto;
}
.tvl-root select.tvl-input {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%234a7a9b' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.tvl-root textarea.tvl-input { resize: vertical; min-height: 64px; }
.tvl-root .tvl-input:focus { border-color: var(--tvl-accent); box-shadow: 0 0 0 3px rgba(0, 114, 198, .15); }
.tvl-root .tvl-input.is-invalid, .tvl-root .is-invalid { border-color: var(--tvl-danger) !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important; }
.tvl-root .tvl-input::placeholder { color: #8aa9bf; }

.tvl-phone-wrap { display: flex; width: 100%; border: 1.5px solid var(--tvl-line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tvl-phone-wrap:focus-within { border-color: var(--tvl-accent); box-shadow: 0 0 0 3px rgba(0, 114, 198, .15); }
.tvl-root .tvl-phone-wrap .tvl-phone { border: 0; box-shadow: none !important; border-radius: 0 12px 12px 0; min-width: 0; flex: 1; }
.tvl-root .tvl-phone-wrap .tvl-phone.is-invalid { box-shadow: inset 0 0 0 2px var(--tvl-danger) !important; }
.tvl-cc-box { position: relative; display: flex; align-items: center; padding: 0 26px 0 12px; border-right: 1.5px solid var(--tvl-line); font-weight: 600; white-space: nowrap; cursor: pointer; margin: 0; color: var(--tvl-ink); font-size: .92rem; }
.tvl-cc-box::after { content: ''; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; border: solid var(--tvl-muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); }
.tvl-root .tvl-cc { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; }

/* ── Compact form ── */
.tvl-form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tvl-root .tvl-label { font-size: .95rem; font-weight: 700; color: var(--tvl-ink); margin: 0 0 -4px; letter-spacing: 0; text-transform: none; }
.tvl-phone-wrap { position: relative; }
.tvl-root .tvl-phone-wrap .tvl-phone { font-size: 1.08rem; padding: 14px 40px 14px 14px; font-weight: 600; letter-spacing: .02em; }
.tvl-tick { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) scale(.6); width: 22px; height: 22px; border-radius: 50%; background: var(--tvl-wa); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.tvl-tick.on { opacity: 1; transform: translateY(-50%) scale(1); }
.tvl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tvl-span2 { grid-column: 1 / -1; }
.tvl-root select.tvl-select { color: #8aa9bf; }
.tvl-root select.tvl-select.has-value { color: var(--tvl-ink); }
.tvl-root select.tvl-select option { color: var(--tvl-ink); }
.tvl-root .tvl-optin { display: flex; gap: 9px; align-items: flex-start; font-size: .86rem; color: var(--tvl-muted); cursor: pointer; margin: -2px 0 0; line-height: 1.35; }
.tvl-root .tvl-optin[hidden] { display: none; }
.tvl-root .tvl-optin input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--tvl-accent); }
.tvl-form .tvl-actions { margin-top: 2px; }
.tvl-form .tvl-btn-wa { flex: 2 1 220px; padding: 15px 18px; font-size: 1rem; }
.tvl-form .tvl-btn-ghost { flex: 1 1 150px; }
.tvl-form .tvl-error { margin: 0; }
.tvl-root .tvl-consent { margin: 0; padding: 0; font-size: .75rem; color: var(--tvl-muted); }
@media (max-width: 520px) {
  .tvl-inline { padding: 0 4px; margin: 32px auto; }
  .tvl-form { padding: 14px; gap: 10px; }
  .tvl-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tvl-root select.tvl-input { padding-left: 10px; padding-right: 26px; background-position: right 9px center; }
  .tvl-root .tvl-grid .tvl-input { padding-left: 10px; padding-right: 10px; }
  .tvl-cc-box { padding: 0 22px 0 10px; }
}
@media (max-width: 360px) { .tvl-grid { grid-template-columns: 1fr; } }

/* ── Done ── */
.tvl-done { padding: 30px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tvl-done-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff; background: var(--tvl-wa); animation: tvl-pop .3s ease-out both; }
.tvl-done-text { margin: 0; font-size: 1.02rem; max-width: 420px; }
.tvl-done .tvl-btn { flex: none; }

/* ── Popup ── */
html.tvl-lock, html.tvl-lock body { overflow: hidden !important; }
.tvl-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(10, 30, 50, .45); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.tvl-overlay.is-open { opacity: 1; }
.tvl-modal { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 30, 60, .35); transform: translateY(14px) scale(.98); transition: transform .22s ease-out; }
.tvl-overlay.is-open .tvl-modal { transform: none; }
.tvl-overlay .tvl-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--tvl-soft); color: var(--tvl-ink); cursor: pointer; display: grid; place-items: center; padding: 0; }
.tvl-overlay .tvl-close:hover { background: #d7e9f6; }
.tvl-modal .tvl-root { border: 0; border-radius: 0; overflow: hidden; }
.tvl-modal-head { padding: 22px 56px 0 20px; display: flex; flex-direction: column; gap: 4px; }
.tvl-modal-head strong { font-family: var(--tvl-font-head); font-size: 1.25rem; color: var(--tvl-ink); line-height: 1.2; }
.tvl-modal-head span { color: var(--tvl-muted); font-size: .92rem; }
.tvl-modal-foot { border-top: 1px solid var(--tvl-line); padding: 12px 18px; text-align: center; background: #f8fbfe; }
.tvl-overlay .tvl-skip { color: var(--tvl-muted); font-size: .85rem; text-decoration: underline; font-family: var(--tvl-font); }
@media (max-width: 600px) {
  .tvl-overlay { align-items: flex-end; padding: 0; }
  .tvl-modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh; transform: translateY(40px); }
  .tvl-overlay .tvl-input, .tvl-overlay select { font-size: 16px; } /* stops iOS zooming into fields */
}
@media (max-width: 600px) { .tvl-root .tvl-input { font-size: 16px; } }

/* ── Floating launcher (replaces the old Call + WhatsApp buttons) ── */
.tvl-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 20px; border: 0; border-radius: 999px; cursor: pointer; color: #fff !important;
  background: linear-gradient(135deg, #005bb5, #0072c6); box-shadow: 0 8px 28px rgba(0, 114, 198, .42);
  font-family: var(--font-head, 'Space Grotesk', system-ui, sans-serif); font-weight: 700; font-size: .92rem; transition: transform .2s, box-shadow .2s, opacity .2s;
}
.tvl-launcher.is-hidden { opacity: 0; pointer-events: none; transform: translateY(16px); }
.tvl-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0, 114, 198, .5); }
.tvl-launcher svg { flex: none; }
.tvl-launcher-dot { position: absolute; top: 6px; left: 30px; width: 9px; height: 9px; border-radius: 50%; background: #25D366; border: 2px solid #0072c6; animation: tvl-pulse 2.4s infinite; }
@keyframes tvl-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); } 50% { box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); } }
@media (max-width: 600px) { .tvl-launcher { right: 14px; bottom: 14px; padding: 13px 16px; font-size: .88rem; } }
@media (prefers-reduced-motion: reduce) { .tvl-root *, .tvl-overlay *, .tvl-launcher * { animation: none !important; transition: none !important; } }

/* ── Other ways in, under the free-trial button ── */
.tvl-root .tvl-alt { margin: -2px 0 0; text-align: center; color: var(--tvl-muted); font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; }
.tvl-root .tvl-alt a { display: inline-flex; align-items: center; gap: 5px; color: var(--tvl-accent-2); font-weight: 700; text-decoration: none; }
.tvl-root .tvl-alt a:hover { text-decoration: underline; }
.tvl-root .tvl-alt a svg { width: 15px; height: 15px; }
.tvl-root .tvl-alt a[data-tvl-contact="whatsapp"] svg { color: #1da851; }
.tvl-alt-sep { color: var(--tvl-line); }

/* ── Dock: Chat on WhatsApp · Call us · Free trial class ── */
.tvl-dock {
  --tvl-accent: #0072c6; --tvl-accent-2: #005bb5; --tvl-ink: #1a3a52; --tvl-wa: #25D366; --tvl-wa-ink: #0b3d1f;
  position: fixed; right: 20px; bottom: 20px; z-index: 99990; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  font-family: var(--font-body, 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  transition: transform .25s, opacity .25s;
}
.tvl-dock, .tvl-dock * { box-sizing: border-box; }
.tvl-dock .tvl-dock-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; text-decoration: none !important;
  font-weight: 700; font-size: 15px; line-height: 1.2; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); transition: transform .15s, box-shadow .15s; white-space: nowrap;
  font-family: var(--font-head, 'Space Grotesk', system-ui, sans-serif);
}
.tvl-dock .tvl-dock-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .22); }
.tvl-dock .tvl-dock-btn svg { width: 20px; height: 20px; flex: none; }
.tvl-dock .tvl-dock-btn small { font-weight: 600; opacity: .7; font-size: 13px; margin-left: -2px; }
.tvl-dock .tvl-dock-wa { order: 3; background: var(--tvl-wa); color: var(--tvl-wa-ink) !important; padding: 14px 22px 14px 16px; font-size: 16px; }
.tvl-dock .tvl-dock-wa svg { width: 24px; height: 24px; }
.tvl-dock .tvl-dock-call { order: 2; background: #fff; color: var(--tvl-ink) !important; border: 1px solid #d5e3ee; }
.tvl-dock .tvl-dock-trial { order: 1; background: linear-gradient(135deg, var(--tvl-accent-2), var(--tvl-accent)); color: #fff !important; }

/* Greeting bubble */
.tvl-greet {
  order: 0; position: relative; width: 300px; max-width: calc(100vw - 40px); background: #fff; color: var(--tvl-ink); border-radius: 16px 16px 4px 16px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .22); opacity: 0; transform: translateY(8px) scale(.97); transform-origin: bottom right; transition: opacity .25s, transform .25s;
}
.tvl-greet.is-open { opacity: 1; transform: none; }
.tvl-greet .tvl-greet-body { display: block; padding: 14px 34px 14px 16px; text-decoration: none !important; color: inherit !important; }
.tvl-greet .tvl-greet-text { display: block; font-size: 14.5px; line-height: 1.45; }
.tvl-greet .tvl-greet-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; font-size: 14px; color: #128c4b; }
.tvl-greet .tvl-greet-cta svg { width: 16px; height: 16px; }
.tvl-greet .tvl-greet-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #64748b; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tvl-greet .tvl-greet-x:hover { background: #f1f5f9; }
.tvl-greet .tvl-greet-x svg { width: 14px; height: 14px; }

html.tvl-lock .tvl-dock { opacity: 0; pointer-events: none; }

/* Phones: one bar along the bottom */
@media (max-width: 767px) {
  .tvl-dock {
    left: 0; right: 0; bottom: 0; flex-direction: row; align-items: stretch; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 20px rgba(15, 23, 42, .12); border-top: 1px solid #e2ebf2;
  }
  .tvl-dock .tvl-dock-btn { flex: 1 1 0; justify-content: center; flex-direction: column; gap: 3px; padding: 8px 4px; border-radius: 12px; font-size: 13px; box-shadow: none; text-align: center; white-space: normal; }
  .tvl-dock .tvl-dock-btn:hover { transform: none; box-shadow: none; }
  .tvl-dock .tvl-dock-btn svg, .tvl-dock .tvl-dock-wa svg { width: 21px; height: 21px; }
  .tvl-dock .tvl-dock-wa { order: 1; padding: 8px 4px; font-size: 13px; }
  .tvl-dock .tvl-dock-call { order: 2; background: #f1f6fa; border-color: #e2ebf2; }
  .tvl-dock .tvl-dock-trial { order: 3; }
  .tvl-dock .tvl-dock-btn small { display: none; }
  .tvl-greet { position: absolute; bottom: calc(100% + 10px); right: 10px; order: 0; }
  body.tvl-has-dock { padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  html.tvl-typing .tvl-dock { transform: translateY(110%); }
}

/* Compact bar (Settings → "Compact contact bar"): fewer, smaller buttons. */
.tvl-dock--compact .tvl-dock-trial { display: none !important; }
@media (min-width: 768px) {
  .tvl-dock--compact .tvl-dock-call { display: none !important; }
  .tvl-dock--compact .tvl-dock-wa { width: 60px; height: 60px; padding: 0; justify-content: center; border-radius: 50%; }
  .tvl-dock--compact .tvl-dock-wa svg { width: 30px; height: 30px; }
  .tvl-dock--compact .tvl-dock-wa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 767px) {
  .tvl-dock--compact { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .tvl-dock--compact .tvl-dock-btn { flex-direction: row; gap: 8px; padding: 10px 8px; font-size: 14px; }
  .tvl-dock--compact .tvl-dock-btn svg, .tvl-dock--compact .tvl-dock-wa svg { width: 20px; height: 20px; }
  body.tvl-has-dock:has(.tvl-dock--compact) { padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important; }
}
