/* liftup.tech chat assistant (assets/js/chat.js). Self-contained colours so it reads the same on the light inner pages
   and the dark homepage. */
.ltc { --ltc-blue: #011ef4; --ltc-blue-2: #0018c4; --ltc-ink: #1d1d1f; --ltc-ink-2: #424245; --ltc-muted: #6e6e73; --ltc-line: #e5e5ea;
  --ltc-bg: #fff; --ltc-bot: #f2f2f7; --ltc-shadow: 0 24px 60px -18px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .08);
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 90; font-size: 15px; line-height: 1.45; letter-spacing: -.005em; }
.ltc *, .ltc *::before, .ltc *::after { box-sizing: border-box; }
.ltc button, .ltc input { font: inherit; letter-spacing: inherit; }
.ltc [hidden] { display: none !important; }

.ltc__fab { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ltc-blue); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px -8px rgba(1, 30, 244, .6), 0 2px 6px rgba(0, 0, 0, .15);
  transition: background-color .2s ease, transform .15s ease; touch-action: manipulation; }
.ltc__fab:hover { background: var(--ltc-blue-2); }
.ltc__fab:active { transform: scale(.97); }
.ltc__fab:focus-visible, .ltc button:focus-visible, .ltc a:focus-visible, .ltc input:focus-visible { outline: 2px solid #8ea0ff; outline-offset: 2px; }
.ltc.is-open .ltc__fab { display: none; }

.ltc__nudge { position: absolute; right: 0; bottom: 64px; width: 250px; margin: 0; padding: 12px 34px 12px 14px; border-radius: 16px; background: var(--ltc-bg); color: var(--ltc-ink);
  box-shadow: var(--ltc-shadow); font-size: 14px; cursor: pointer; animation: ltc-in .35s cubic-bezier(.2, .7, .2, 1) both; }
.ltc__nudge-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--ltc-muted); cursor: pointer; }
.ltc__nudge-x:hover { background: var(--ltc-bot); }

.ltc__panel { width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 40px)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--ltc-bg); color: var(--ltc-ink); border-radius: 22px; box-shadow: var(--ltc-shadow); transform-origin: bottom right;
  animation: ltc-in .3s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes ltc-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.ltc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 14px 14px 18px; background: var(--ltc-ink); color: #fff; }
.ltc__title { margin: 0; font-weight: 600; font-size: 16px; }
.ltc__sub { margin: 2px 0 0; font-size: 13px; color: #c7c7cc; }
.ltc__close { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.ltc__close:hover { background: rgba(255, 255, 255, .2); }

.ltc__log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.ltc__msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; overflow-wrap: anywhere; }
.ltc__msg--bot { align-self: flex-start; background: var(--ltc-bot); color: var(--ltc-ink); border-bottom-left-radius: 6px; }
.ltc__msg--me { align-self: flex-end; background: var(--ltc-blue); color: #fff; border-bottom-right-radius: 6px; }
.ltc__msg a { color: var(--ltc-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ltc__msg--wait { color: var(--ltc-muted); animation: ltc-pulse 1.2s ease-in-out infinite; }
@keyframes ltc-pulse { 50% { opacity: .45; } }

.ltc__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.ltc__chip { min-height: 34px; padding: 6px 12px; border: 1px solid var(--ltc-line); border-radius: 999px; background: var(--ltc-bg); color: var(--ltc-ink); font-size: 13.5px; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease; touch-action: manipulation; }
.ltc__chip:hover { border-color: var(--ltc-blue); background: #eef1ff; }
.ltc__chip--lead { border-color: var(--ltc-blue); color: var(--ltc-blue); font-weight: 600; }

.ltc__in { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ltc-line); }
.ltc__in input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--ltc-line); border-radius: 999px; background: #f9f9fb; color: var(--ltc-ink); font-size: 16px; }
.ltc__in input:focus { outline: none; border-color: var(--ltc-blue); background: #fff; }
.ltc__in button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ltc-blue); color: #fff; cursor: pointer; }
.ltc__in button:disabled { opacity: .5; cursor: progress; }

.ltc__lead { display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--ltc-line); }
.ltc__lead-h { margin: 0; font-weight: 600; }
.ltc__lead label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ltc-ink-2); }
.ltc__lead label span { color: var(--ltc-muted); font-weight: 400; }
.ltc__lead input { min-height: 44px; padding: 0 12px; border: 1px solid var(--ltc-line); border-radius: 12px; background: #f9f9fb; color: var(--ltc-ink); font-size: 16px; }
.ltc__lead input:focus { outline: none; border-color: var(--ltc-blue); background: #fff; }
.ltc__err { margin: 0; color: #c4161c; font-size: 13.5px; }
.ltc__go { min-height: 46px; border: 0; border-radius: 12px; background: var(--ltc-blue); color: #fff; font-weight: 600; cursor: pointer; }
.ltc__go:disabled { opacity: .7; cursor: progress; }
.ltc__cancel { min-height: 36px; border: 0; background: transparent; color: var(--ltc-muted); cursor: pointer; }

.ltc__foot { margin: 0; padding: 0 14px 12px; text-align: center; font-size: 12.5px; color: var(--ltc-muted); }
.ltc__foot a { color: var(--ltc-ink-2); }
.ltc__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: sit above the "Get a free quote" bar, and open as a near full-screen sheet */
@media (max-width: 834px) {
  .ltc { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .ltc--qbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .ltc__fab { min-height: 48px; padding: 0 16px 0 14px; }
  .ltc.is-open { left: 0; right: 0; bottom: 0; }
  .ltc.is-open .ltc__panel { width: 100%; height: min(88dvh, 640px); border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) { .ltc__panel, .ltc__nudge { animation: none; } .ltc__msg--wait { animation: none; } }
@media print { .ltc { display: none; } }

/* hand-off to WhatsApp inside a bot message (question already typed in) */
.ltc__wa { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: #15803d; color: #fff !important; font-weight: 600; text-decoration: none !important; touch-action: manipulation; }
.ltc__wa:hover { background: #166534; }
