/* ---------- Leverage Assistant (chat) ---------- */
#lv-bot { position: fixed; right: 100px; bottom: 26px; z-index: 950; font-family: var(--font, 'IBM Plex Sans', system-ui, sans-serif); color: var(--ink, #0B1424); --lv-navy: var(--navy, #0E1E37); --lv-navy2: #1E3A5F; --lv-gold: var(--gold, #C9A227); --lv-gold2: var(--gold-soft, #E9C86B); --lv-cream: var(--cream, #F5F1E6); --lv-line: var(--line, #E2DCCB); --lv-muted: var(--muted, #5A6B85); }
#lv-bot * { box-sizing: border-box; }
#lv-bot.lv-open { z-index: 1200; } /* above the site's sticky header while the chat is open */

.lv-launch {
  position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: linear-gradient(145deg, var(--lv-gold2), var(--lv-gold)); color: var(--lv-navy);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(14,30,55,.28), 0 0 0 0 rgba(201,162,39,.45);
  transition: transform .3s ease, box-shadow .3s ease; animation: lv-pulse 3s ease-out 4s 3;
}
.lv-launch:hover { transform: translateY(-3px) scale(1.04); }
.lv-launch > svg, .lv-launch .lv-x { position: absolute; width: 28px; height: 28px; display: flex; transition: opacity .25s, transform .35s ease; }
.lv-launch .lv-x svg { width: 26px; height: 26px; }
.lv-launch .lv-x { opacity: 0; transform: rotate(-90deg) scale(.6); }
.lv-open .lv-launch > svg { opacity: 0; transform: rotate(90deg) scale(.6); }
.lv-open .lv-launch .lv-x { opacity: 1; transform: none; }
.lv-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: #C0392B; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.lv-win[hidden], .lv-badge[hidden], .lv-teaser[hidden] { display: none !important; }
@keyframes lv-pulse { 0% { box-shadow: 0 10px 30px rgba(14,30,55,.28), 0 0 0 0 rgba(201,162,39,.5); } 100% { box-shadow: 0 10px 30px rgba(14,30,55,.28), 0 0 0 22px rgba(201,162,39,0); } }

.lv-teaser { position: absolute; right: 70px; bottom: 4px; width: 260px; background: #fff; border: 1px solid var(--lv-line); border-radius: 14px 14px 4px 14px; padding: 12px 34px 12px 14px; font-size: 13.5px; line-height: 1.45; box-shadow: 0 14px 40px rgba(14,30,55,.16); cursor: pointer; animation: lv-up .5s ease; }
.lv-teaser button { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 18px; color: var(--lv-muted); cursor: pointer; line-height: 1; }

.lv-win { position: absolute; right: 0; bottom: 74px; width: 400px; max-width: calc(100vw - 32px); height: 640px; max-height: calc(100vh - 110px); background: var(--lv-cream); border-radius: 18px; box-shadow: 0 24px 70px rgba(14,30,55,.30); overflow: hidden; display: flex; flex-direction: column; transform-origin: bottom right; animation: lv-up .4s ease; text-align: left; }
.lv-win[dir="rtl"] { text-align: right; }
@keyframes lv-up { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

.lv-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; background: linear-gradient(135deg, var(--lv-navy), var(--lv-navy2)); color: #fff; }
.lv-avatar, .lv-mini { flex: 0 0 auto; border-radius: 50%; background: var(--lv-gold); color: var(--lv-navy); display: flex; align-items: center; justify-content: center; }
.lv-avatar { width: 42px; height: 42px; box-shadow: 0 0 0 3px rgba(201,162,39,.25); }
.lv-avatar svg { width: 22px; height: 22px; }
.lv-title { flex: 1; min-width: 0; line-height: 1.25; }
.lv-title strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.lv-title span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.72); }
.lv-title em { font-style: normal; }
.lv-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.lv-lang, .lv-close { border: 0; background: rgba(255,255,255,.1); color: #fff; height: 32px; border-radius: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.lv-lang { padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; font-family: inherit; }
.lv-close { width: 32px; }
.lv-lang:hover, .lv-close:hover { background: rgba(255,255,255,.2); }
.lv-close svg { width: 16px; height: 16px; }

.lv-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; }
.lv-msg { display: flex; gap: 8px; align-items: flex-end; animation: lv-up .3s ease; }
.lv-msg.lv-instant { animation: none; }
.lv-mini { width: 26px; height: 26px; margin-bottom: 2px; }
.lv-mini svg { width: 14px; height: 14px; }
.lv-bubble { max-width: 84%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-wrap: break-word; }
.lv-bot .lv-bubble { background: #fff; border: 1px solid var(--lv-line); border-bottom-left-radius: 4px; }
.lv-win[dir="rtl"] .lv-bot .lv-bubble { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.lv-user { justify-content: flex-end; }
.lv-user .lv-bubble { background: var(--lv-navy); color: #fff; border-bottom-right-radius: 4px; }
.lv-win[dir="rtl"] .lv-user .lv-bubble { border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
.lv-bubble p, .lv-bubble ul, .lv-bubble ol { margin: 0 0 8px; }
.lv-bubble > :last-child { margin-bottom: 0; }
.lv-bubble ul, .lv-bubble ol { padding-left: 18px; }
.lv-win[dir="rtl"] .lv-bubble ul, .lv-win[dir="rtl"] .lv-bubble ol { padding-left: 0; padding-right: 18px; }
.lv-bubble li { margin: 3px 0; }
.lv-bubble a { color: var(--lv-navy2); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.lv-bubble a:hover { color: var(--lv-gold); }
.lv-bubble small { color: var(--lv-muted); }
.lv-bubble .lv-in { animation: lv-fade .35s ease; }
.lv-more { font-size: 12.5px; color: var(--lv-muted); margin-top: 6px !important; }
@keyframes lv-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lv-card { border: 1px solid var(--lv-line); border-radius: 12px; padding: 12px 14px; background: var(--lv-cream); margin-top: 4px; }
.lv-card strong { display: block; font-size: 15px; margin: 4px 0 6px; color: var(--lv-navy); }
.lv-card p { font-size: 13.5px; }
.lv-cat { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lv-gold); }
.lv-meta { display: block; font-size: 12.5px; color: var(--lv-muted); margin: 6px 0 10px; }
.lv-list { list-style: none; padding: 0 !important; }
.lv-list li { padding: 6px 0; border-bottom: 1px dashed var(--lv-line); display: flex; justify-content: space-between; gap: 10px; }
.lv-list li:last-child { border-bottom: 0; }
.lv-bubble .lv-btn { display: inline-block; margin-top: 2px; padding: 9px 14px; border-radius: 999px; background: var(--lv-navy); color: #fff !important; text-decoration: none !important; font-size: 13px; font-weight: 600; transition: background .2s, transform .2s; }
.lv-bubble .lv-btn:hover { background: var(--lv-navy2); transform: translateY(-1px); }

.lv-typing .lv-bubble { display: flex; gap: 5px; padding: 14px 16px; }
.lv-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--lv-muted); animation: lv-blink 1.2s infinite; }
.lv-typing span:nth-child(2) { animation-delay: .18s; }
.lv-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes lv-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.lv-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 10px; }
.lv-chips:empty { display: none; }
.lv-chips button { border: 1px solid var(--lv-navy2); background: transparent; color: var(--lv-navy); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .2s, color .2s, transform .2s; animation: lv-fade .4s ease both; }
.lv-chips button.lv-alt { border-color: var(--lv-gold); color: #7a6115; }
.lv-chips button:nth-child(2) { animation-delay: .08s; } .lv-chips button:nth-child(3) { animation-delay: .16s; } .lv-chips button:nth-child(4) { animation-delay: .24s; }
.lv-chips button:hover { background: var(--lv-navy); color: #fff; transform: translateY(-1px); }

.lv-form { display: flex; gap: 8px; padding: 10px 12px 10px 14px; border-top: 1px solid var(--lv-line); background: #fff; }
.lv-form input { flex: 1; border: 1px solid var(--lv-line); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; background: var(--lv-cream); color: inherit; outline: none; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.lv-form input:focus { border-color: var(--lv-gold); box-shadow: 0 0 0 3px rgba(201,162,39,.2); }
.lv-form button { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lv-navy); color: var(--lv-gold2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; }
.lv-form button:hover { background: var(--lv-navy2); transform: scale(1.05); }
.lv-form button svg { width: 18px; height: 18px; }
.lv-win[dir="rtl"] .lv-form button svg { transform: scaleX(-1); }
.lv-foot { padding: 6px 14px 9px; font-size: 10.5px; color: var(--lv-muted); text-align: center; background: #fff; }
.lv-foot button { border: 0; background: none; color: var(--lv-muted); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.lv-foot button:hover { color: var(--lv-navy); }

@media (max-width: 640px) {
  #lv-bot { right: 90px; bottom: 20px; }
  .lv-launch { width: 54px; height: 54px; }
  .lv-win { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; bottom: 0; }
  .lv-open .lv-launch { display: none; }
  .lv-form input { font-size: 16px; }
  .lv-bubble { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) { .lv-launch, .lv-win, .lv-msg, .lv-teaser, .lv-chips button, .lv-bubble .lv-in { animation: none !important; } }
