/* CSI site guide (assets/chat.js) */
:root { --csi-chat-lift: 0px; --csi-chat-accent: #0ea5e9; --csi-chat-ink: #0f172a; --csi-chat-muted: #64748b; --csi-chat-line: #e2e8f0; }
.csi-chat-launch { position: fixed !important; margin: 0; right: 20px; bottom: calc(20px + var(--csi-chat-lift)); z-index: 2990; display: inline-flex; align-items: center; gap: .55rem;
  padding: .9rem 1.35rem .9rem 1.1rem; border: 0; border-radius: 999px; background: var(--csi-chat-ink); color: #fff; font: 600 1rem/1 var(--font-body, system-ui, sans-serif);
  box-shadow: 0 12px 30px -8px rgb(15 23 42 / .45); cursor: pointer; transition: bottom .3s ease, transform .2s ease, opacity .3s ease; }
.csi-chat-launch[hidden] { display: none; }
.csi-chat-launch.is-in { animation: csi-chat-in .45s ease both; }
.csi-chat-launch:hover { transform: translateY(-2px); }
.csi-chat-mark { width: 18px; height: 20px; display: block; flex-shrink: 0; }
.csi-chat-launch .csi-chat-mark { width: 20px; height: 22px; }
.csi-chat-tip { position: fixed; right: 20px; bottom: calc(84px + var(--csi-chat-lift)); z-index: 2989; max-width: 250px; padding: .7rem .9rem; border: 1px solid #e2e8f0; border-radius: 14px 14px 4px 14px;
  background: #fff; color: var(--csi-chat-ink); font: 500 .88rem/1.4 var(--font-body, system-ui, sans-serif); text-align: left; box-shadow: 0 14px 30px -12px rgb(15 23 42 / .35); cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.csi-chat-tip.is-in { opacity: 1; transform: none; }
@media (max-width: 700px) { .csi-chat-tip { display: none; } }
.csi-chat-badge { position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f43f5e; color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.csi-chat-badge[hidden] { display: none; }
@keyframes csi-chat-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.csi-chat { position: fixed !important; margin: 0 !important; right: 20px; bottom: calc(20px + var(--csi-chat-lift)); z-index: 2995; width: min(390px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px - var(--csi-chat-lift)));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--csi-chat-line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgb(15 23 42 / .45); font: 400 .9rem/1.45 var(--font-body, system-ui, sans-serif); color: var(--csi-chat-ink); animation: csi-chat-in .25s ease both; }
.csi-chat[hidden] { display: none; }
.csi-chat__head { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem .85rem 1rem; background: var(--csi-chat-ink); color: #fff; }
.csi-chat__head div { flex: 1; display: flex; flex-direction: column; }
.csi-chat__head strong { font-size: .98rem; }
.csi-chat__head small { color: #94a3b8; font-size: .74rem; }
.csi-chat__avatar { width: 36px; height: 36px; border-radius: 10px; background: #111; display: inline-flex; align-items: center; justify-content: center; }
.csi-chat__head button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #cbd5e1; cursor: pointer; font-size: .95rem; }
.csi-chat__head button:hover { background: #1e293b; color: #fff; }
.csi-chat__log { flex: 1; overflow-y: auto; padding: 1rem .9rem .5rem; display: flex; flex-direction: column; gap: .55rem; background: #f8fafc; overscroll-behavior: contain; }
.csi-chat-msg { max-width: 88%; }
.csi-chat-msg p { margin: 0; padding: .6rem .8rem; border-radius: 14px; }
.csi-chat-msg--bot p { background: #fff; border: 1px solid var(--csi-chat-line); border-bottom-left-radius: 4px; }
.csi-chat-msg--me { align-self: flex-end; }
.csi-chat-msg--me p { background: var(--csi-chat-accent); color: #fff; border-bottom-right-radius: 4px; }
.csi-chat-cards { display: flex; flex-direction: column; gap: .4rem; margin-top: .4rem; }
.csi-chat-card { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .6rem 2rem .65rem .8rem; background: #fff; border: 1px solid var(--csi-chat-line); border-radius: 12px;
  color: var(--csi-chat-ink) !important; text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.csi-chat-card:hover { border-color: var(--csi-chat-accent); box-shadow: 0 6px 16px -10px rgb(14 165 233 / .7); }
.csi-chat-card strong { font-size: .88rem; font-weight: 600; }
.csi-chat-card span { font-size: .78rem; color: var(--csi-chat-muted); line-height: 1.35; }
.csi-chat-card i { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--csi-chat-accent); font-size: .8rem; }
.csi-chat__opts { display: flex; flex-wrap: wrap; gap: .4rem; padding: .55rem .9rem .2rem; background: #f8fafc; max-height: 40%; overflow-y: auto; }
.csi-chat__opts:empty { display: none; }
.csi-chat-opt { border: 1px solid #bae6fd; background: #fff; color: #0369a1; border-radius: 999px; padding: .4rem .75rem; font: 500 .82rem/1.2 inherit; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
.csi-chat-opt:hover, .csi-chat-opt:focus-visible { background: var(--csi-chat-accent); border-color: var(--csi-chat-accent); color: #fff; outline: none; }
.csi-chat__ask { display: flex; gap: .4rem; padding: .6rem .7rem; border-top: 1px solid var(--csi-chat-line); background: #fff; }
.csi-chat__ask input { flex: 1; min-width: 0; border: 1px solid var(--csi-chat-line); border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: 16px; }
@media (min-width: 701px) { .csi-chat__ask input { font-size: .88rem; } }
.csi-chat__ask input:focus { outline: none; border-color: var(--csi-chat-accent); }
.csi-chat__ask button { width: 40px; border: 0; border-radius: 10px; background: var(--csi-chat-ink); color: #fff; cursor: pointer; }
.csi-chat-contact { display: flex; flex-direction: column; gap: .4rem; margin-top: .45rem; padding: .7rem; background: #fff; border: 1px solid var(--csi-chat-line); border-radius: 12px; }
.csi-chat-contact input[type=email], .csi-chat-contact input[type=text], .csi-chat-contact input[type=tel] { border: 1px solid var(--csi-chat-line); border-radius: 8px; padding: .5rem .6rem; font: inherit; font-size: 16px; }
@media (min-width: 701px) { .csi-chat-contact input[type=email], .csi-chat-contact input[type=text], .csi-chat-contact input[type=tel] { font-size: .85rem; } }
.csi-chat-contact label { font-size: .74rem; color: var(--csi-chat-muted); display: flex; gap: .4rem; align-items: flex-start; line-height: 1.35; }
.csi-chat-contact label input { margin-top: .15rem; }
.csi-chat-contact a { color: #0369a1; }
.csi-chat-contact .is-bad { border-color: #f43f5e !important; color: #be123c; }
.csi-chat-send { border: 0; border-radius: 8px; background: var(--csi-chat-accent); color: #fff; font: 600 .88rem/1 inherit; font-family: inherit; padding: .65rem; cursor: pointer; }
.csi-chat-send:disabled { opacity: .6; }
@media (max-width: 700px) {
  .csi-chat-launch { right: 12px; bottom: calc(12px + var(--csi-chat-lift)); padding: .7rem; }
  .csi-chat-launch span { display: none; }
  .csi-chat { right: 0; left: 0; bottom: 0; width: 100%; height: 88vh; height: 88dvh; border-radius: 18px 18px 0 0; }
  html.csi-chat-open { overflow: hidden; }
}
@media print { .csi-chat, .csi-chat-launch { display: none !important; } }
