/* Live Support page only (/support/). Every selector is prefixed .ls- so nothing leaks into the site. */
.support-page .float-chat { display: none; }

.ls-section { background: var(--soft); padding: var(--s-7) 0 var(--section-y); }
.ls-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--grid-gap); align-items: start; }

/* Card + views */
.ls-card { position: relative; display: flex; flex-direction: column; height: min(720px, calc(100vh - var(--header-h) - 48px)); min-height: 560px; background: #fff; border: 1.5px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
@supports (height: 100dvh) { .ls-card { height: min(720px, calc(100dvh - var(--header-h) - 48px)); } }
.ls-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ls-center { align-items: center; justify-content: center; gap: var(--s-3); color: var(--muted); }
.ls-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: ls-spin 0.8s linear infinite; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

/* Start / verify / denied */
.ls-start { justify-content: center; padding: var(--card-pad); overflow-y: auto; }
.ls-start h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); text-align: center; margin-bottom: var(--s-2); }
.ls-start__badge { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto var(--s-4); border-radius: 18px; background: var(--grad); font-size: 1.7rem; box-shadow: 0 12px 24px -12px rgba(47, 107, 255, 0.7); }
.ls-start__intro { margin: 0 auto var(--s-5); max-width: 46ch; text-align: center; color: var(--muted); font-size: 0.97rem; }
.ls-start__intro strong { color: var(--ink); }
.ls-label { display: block; margin-bottom: var(--s-2); font-weight: 600; font-size: 0.93rem; color: var(--ink); }
.ls-phone { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 14px; background: #fbfcfe; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.ls-phone:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.15); background: #fff; }
.ls-phone select { flex: none; max-width: 112px; padding: 0 var(--s-2) 0 var(--s-3); border: 0; border-right: 1.5px solid var(--line); background: var(--soft); font: 600 1rem/1 var(--font-body); color: var(--ink); cursor: pointer; }
.ls-phone input { flex: 1; min-width: 0; padding: 0.85em var(--s-4); border: 0; background: transparent; font: 500 1.1rem/1.3 var(--font-body); letter-spacing: 0.02em; color: var(--ink); }
.ls-phone select:focus, .ls-phone input:focus { outline: none; }
.ls-error { margin: var(--s-2) 0 0; font-size: 0.9rem; font-weight: 600; color: #d93036; }
.ls-btn { display: flex; align-items: center; justify-content: center; gap: 0.5em; width: 100%; margin-top: var(--s-4); padding: 1em 1.4em; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font: 700 1.05rem/1.1 var(--font-body); cursor: pointer; box-shadow: 0 12px 26px -12px rgba(47, 107, 255, 0.75); transition: transform 0.2s, box-shadow 0.2s; }
.ls-btn:hover { transform: translateY(-2px); }
.ls-btn:disabled { opacity: 0.7; transform: none; cursor: progress; }
.ls-btn .i { width: 1.1em; height: 1.1em; }
.ls-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-4); margin: var(--s-4) 0 0; padding: 0; list-style: none; font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.ls-perks li { display: inline-flex; align-items: center; gap: 0.35em; }
.ls-perks .i { color: var(--mint); }
.ls-fine { margin: var(--s-4) 0 0; text-align: center; font-size: 0.8rem; color: var(--muted); }
.ls-code { display: block; width: 100%; max-width: 280px; margin: 0 auto; padding: 0.7em; border: 1.5px solid var(--line); border-radius: 14px; background: #fbfcfe; text-align: center; font: 700 1.8rem/1 var(--font-head); letter-spacing: 0.45em; color: var(--ink); }
.ls-code:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.15); }
.ls-start form .ls-error { text-align: center; }
.ls-wait { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: var(--s-4) 0 0; font-weight: 600; color: var(--muted); }
.ls-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); animation: ls-ping 1.6s infinite; }
@keyframes ls-ping { 0% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(18, 184, 134, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0); } }
.ls-links { display: grid; gap: var(--s-2); margin-top: var(--s-5); text-align: center; }
.ls-links button { padding: 0; border: 0; background: none; color: var(--blue); font: 600 0.92rem/1.4 var(--font-body); cursor: pointer; }
.ls-links button:last-child { color: var(--muted); }

/* Chat view */
.ls-chat { position: relative; }
.ls-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: linear-gradient(120deg, #121a3a, #2f6bff); color: #fff; }
.ls-avatar { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.ls-avatar .i { width: 22px; height: 22px; }
.ls-avatar__dot { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #1d2f6e; background: #f5b740; }
.ls[data-ls-conn="online"] .ls-avatar__dot { background: #3ee0a8; }
.ls[data-ls-conn="offline"] .ls-avatar__dot { background: #ff6b81; }
.ls-head__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ls-head__txt strong { font: 700 1.05rem/1.2 var(--font-head); }
.ls-head__txt span { font-size: 0.8rem; color: #c8d4ff; }
.ls-chip { display: inline-flex; align-items: center; gap: 0.4em; margin-left: auto; padding: 0.45em 0.8em; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font: 600 0.82rem/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.ls-chip .i { width: 14px; height: 14px; }
.ls-chip.is-copied { background: var(--mint); border-color: var(--mint); }
.ls-iconbtn { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.15rem; cursor: pointer; }
.ls-head .ls-iconbtn { background: rgba(255, 255, 255, 0.1); }
.ls-iconbtn .i { width: 18px; height: 18px; }
.ls-iconbtn:hover { background: rgba(47, 107, 255, 0.1); }
.ls-offline { padding: var(--s-1) var(--s-4); background: #fff4dc; color: #8a5a00; font-size: 0.82rem; font-weight: 600; text-align: center; }
.ls-banner { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4); background: #eef3ff; color: var(--ink); font-size: 0.86rem; }
.ls-banner span { flex: 1; }
.ls-banner button { padding: 0.45em 0.9em; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: 600 0.82rem/1 var(--font-body); cursor: pointer; }
.ls-banner .ls-banner__x { padding: 0.4em 0.55em; background: transparent; color: var(--muted); }
.ls-thread { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-4) var(--s-4) var(--s-2); background-color: #eef1f8; background-image: radial-gradient(rgba(47, 107, 255, 0.07) 1px, transparent 1px); background-size: 18px 18px; overscroll-behavior: contain; scroll-behavior: auto; }
.ls-more { display: block; margin: 0 auto var(--s-3); padding: 0.4em 1em; border: 0; border-radius: 999px; background: #fff; color: var(--blue); font: 600 0.8rem/1 var(--font-body); box-shadow: var(--shadow); cursor: pointer; }
.ls-day { display: flex; justify-content: center; margin: var(--s-3) 0; }
.ls-day span { padding: 0.3em 0.8em; border-radius: 8px; background: rgba(255, 255, 255, 0.9); color: var(--muted); font-size: 0.75rem; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 64, 0.08); }
.ls-row { display: flex; margin: 3px 0; animation: ls-pop 0.18s ease both; }
.ls-row--me { justify-content: flex-end; }
.ls-row--sys { justify-content: center; margin: var(--s-2) 0; }
@keyframes ls-pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }
.ls-bubble { max-width: min(78%, 520px); padding: 8px 12px 5px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 64, 0.1); word-wrap: break-word; overflow-wrap: anywhere; }
.ls-row--them .ls-bubble { border-bottom-left-radius: 6px; }
.ls-row--me .ls-bubble { border-bottom-right-radius: 6px; background: var(--grad); color: #fff; }
.ls-text { white-space: pre-wrap; font-size: 0.97rem; line-height: 1.45; }
.ls-text a { color: inherit; text-decoration: underline; }
.ls-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.7rem; opacity: 0.72; }
.ls-tick { font-weight: 700; }
.ls-row--failed .ls-bubble { background: #ffe9ec; color: #a1122b; }
.ls-retry { padding: 0; border: 0; background: none; color: inherit; font: 700 0.75rem/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.ls-sys { max-width: 92%; padding: var(--s-3) var(--s-4); border: 1px solid #f7dfa4; border-radius: 14px; background: #fff8e6; color: #5c4710; font-size: 0.9rem; text-align: center; white-space: pre-line; }
.ls-media { display: block; margin: -2px -6px 4px; }
.ls-media img { display: block; max-width: 100%; max-height: 280px; border-radius: 12px; object-fit: cover; }
.ls-file { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 4px; padding: var(--s-2) var(--s-3); border-radius: 10px; background: rgba(0, 0, 0, 0.06); color: inherit; text-decoration: none; }
.ls-row--me .ls-file { background: rgba(255, 255, 255, 0.18); }
.ls-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ls-file small { opacity: 0.7; white-space: nowrap; }
.ls-typing { display: flex; gap: 4px; padding: 12px 14px; }
.ls-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6c7; animation: ls-dots 1.2s infinite ease-in-out; }
.ls-typing i:nth-child(2) { animation-delay: 0.15s; }
.ls-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ls-dots { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
.ls-jump { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); padding: 0.5em 1em; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 0.82rem/1 var(--font-body); box-shadow: var(--shadow-lg); cursor: pointer; }
.ls-quick { display: flex; gap: var(--s-2); padding: var(--s-2) var(--s-3); overflow-x: auto; background: #fff; border-top: 1px solid var(--line); scrollbar-width: none; }
.ls-quick::-webkit-scrollbar { display: none; }
.ls-quick button { flex: none; padding: 0.5em 0.9em; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 0.84rem/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.ls-quick button:hover { border-color: var(--blue); color: var(--blue); }
.ls-attach { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); background: var(--soft); font-size: 0.86rem; }
.ls-attach__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ls-attach__status { color: var(--muted); white-space: nowrap; }
.ls-attach button { border: 0; background: none; color: #d93036; cursor: pointer; }
.ls-compose { display: flex; align-items: flex-end; gap: var(--s-2); padding: var(--s-2) var(--s-3) var(--s-3); padding-bottom: max(var(--s-3), env(safe-area-inset-bottom)); background: #fff; }
.ls-compose textarea { flex: 1; min-width: 0; max-height: 140px; padding: 0.7em 1em; border: 1.5px solid var(--line); border-radius: 22px; background: #fbfcfe; font: 400 1rem/1.4 var(--font-body); color: var(--ink); resize: none; }
.ls-compose textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.ls-send { display: grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--grad); color: #fff; cursor: pointer; box-shadow: 0 8px 18px -8px rgba(47, 107, 255, 0.8); }
.ls-send .i { width: 20px; height: 20px; }

/* Guide */
.ls-guide { padding: var(--card-pad); background: #fff; border: 1.5px solid var(--line); border-radius: 24px; }
.ls-guide h2 { font-size: 1.4rem; margin-bottom: var(--s-4); }
.ls-steps { display: grid; gap: var(--s-4); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.ls-steps li { display: flex; gap: var(--s-3); align-items: flex-start; }
.ls-steps li > span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font: 800 0.95rem/1 var(--font-head); }
.ls-steps strong { display: block; color: var(--ink); }
.ls-steps p { margin: 2px 0 0; font-size: 0.93rem; color: var(--muted); }
.ls-remember { padding: var(--s-4); border: 1px solid #f7dfa4; border-radius: 16px; background: #fff8e6; }
.ls-remember strong { display: inline-flex; align-items: center; gap: 0.4em; color: #5c4710; }
.ls-remember .i { color: #e0a100; }
.ls-remember p { margin: var(--s-1) 0 0; font-size: 0.93rem; color: #5c4710; }
.ls-privacy { display: flex; gap: var(--s-2); margin: var(--s-4) 0 0; font-size: 0.88rem; color: var(--muted); }
.ls-privacy .i { flex: none; margin-top: 0.2em; color: var(--mint); }
.ls-alt { margin: var(--s-3) 0 0; font-size: 0.88rem; color: var(--muted); }

@media (max-width: 980px) {
  .ls-section { padding-top: var(--s-5); }
  .ls-layout { grid-template-columns: minmax(0, 1fr); }
  .ls-card { min-height: 0; height: auto; }
  .ls[data-state="chat"] .ls-card { height: calc(100vh - var(--header-h) - 16px); }
  @supports (height: 100dvh) { .ls[data-state="chat"] .ls-card { height: calc(100dvh - var(--header-h) - 16px); } }
  .ls-chip span { display: none; }
}
@media (max-width: 480px) {
  .ls-start { padding: var(--s-5) var(--s-4); }
  .ls-phone select { max-width: 96px; font-size: 0.95rem; }
  .ls-bubble { max-width: 86%; }
  .ls-card { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ls-row, .ls-spinner, .ls-pulse, .ls-typing i { animation: none; }
}
