/* ---------- Chatbot Business Telecom ---------- */
.bt-chat { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 95; font-family: var(--f-body); }
.bt-chat__launch { width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -12px rgba(13,59,94,.7); transition: transform .2s var(--ease), background .2s; position: relative; }
.bt-chat__launch:hover { transform: translateY(-2px) scale(1.04); background: #3A95D6; }
.bt-chat__launch svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bt-chat__dot { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--sky); border: 3px solid #fff; }
.bt-chat__dot[hidden] { display: none; }

.bt-chat__teaser { position: absolute; right: 0; bottom: 76px; width: min(300px, calc(100vw - 36px)); background: #fff; color: var(--ink); border-radius: 20px 20px 6px 20px; padding: 14px 40px 14px 16px; box-shadow: 0 20px 40px -18px rgba(13,59,94,.55); border: 2px solid var(--line); font-size: .95rem; line-height: 1.45; cursor: pointer; animation: btPop .45s var(--ease) both; }
.bt-chat__teaser[hidden] { display: none; }
.bt-chat__teaser b { color: var(--sea); }
.bt-chat__teaser-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.bt-chat__teaser-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.bt-chat__panel { position: absolute; right: 0; bottom: 76px; width: min(380px, calc(100vw - 36px)); height: min(580px, calc(100vh - 120px)); background: var(--paper); border-radius: 26px; box-shadow: 0 30px 60px -24px rgba(13,59,94,.6); border: 2px solid var(--line); display: flex; flex-direction: column; overflow: hidden; animation: btPop .35s var(--ease) both; }
.bt-chat__panel[hidden] { display: none; }
.bt-chat__head { background: var(--sea); color: #fff; padding: 14px 14px 14px 16px; display: flex; align-items: center; gap: 12px; }
.bt-chat__avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--blue); display: grid; place-items: center; flex: none; }
.bt-chat__avatar svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bt-chat__who { flex: 1; min-width: 0; }
.bt-chat__who b { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.bt-chat__who span { font-size: .8rem; color: #CFE3F2; display: inline-flex; align-items: center; gap: 6px; }
.bt-chat__who span i { width: 8px; height: 8px; border-radius: 50%; background: #7FD15B; }
.bt-chat__close { width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.bt-chat__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.bt-chat__log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.bt-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.45; animation: btIn .3s var(--ease) both; }
.bt-msg--bot { background: #fff; border: 2px solid var(--line); color: var(--ink); border-bottom-left-radius: 6px; align-self: flex-start; }
.bt-msg--bot b { color: var(--sea); }
.bt-msg--me { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.bt-typing { align-self: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; padding: 12px 14px; display: flex; gap: 4px; }
.bt-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9DB3C6; animation: btDot 1s infinite; }
.bt-typing i:nth-child(2) { animation-delay: .15s; } .bt-typing i:nth-child(3) { animation-delay: .3s; }

.bt-chat__actions { padding: 8px 14px 14px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); background: var(--paper); }
.bt-chat__actions:empty { display: none; }
.bt-choice { border: 2px solid var(--blue); background: #fff; color: var(--sea); border-radius: 14px; padding: 9px 12px; font-weight: 700; font-size: .9rem; cursor: pointer; text-align: left; transition: background .15s, transform .15s; }
.bt-choice:hover { background: var(--blue-50); transform: translateY(-1px); }
.bt-choice--main { background: var(--sun); border-color: var(--sun-600); color: #fff; }
.bt-choice--main:hover { background: #0A82D6; }

.bt-form { display: grid; gap: 8px; width: 100%; }
.bt-form input[type="text"], .bt-form input[type="tel"] { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 1rem; background: #fff; color: var(--ink); }
.bt-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.bt-form label.bt-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--ink-2); line-height: 1.35; cursor: pointer; }
.bt-form label.bt-consent input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--blue); }
.bt-form__row { display: flex; gap: 8px; }
.bt-form__row input { flex: 1; min-width: 0; }
.bt-form__row .bt-choice { flex: 1; text-align: center; }
.bt-form__err { color: #B83A26; font-size: .84rem; font-weight: 600; }
.bt-form__err:empty { display: none; }
.bt-chat__foot { font-size: .72rem; color: var(--ink-2); text-align: center; padding: 0 14px 10px; background: var(--paper); }

@keyframes btPop { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes btIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes btDot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 520px) {
  .bt-chat__panel { position: fixed; inset: auto 0 0 0; width: 100%; height: min(86vh, 640px); border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bt-chat__launch { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .bt-chat *, .bt-chat { animation: none !important; transition: none !important; }
}
