/* ZippyLink chat assistant + WhatsApp button */
.zl-wa, .zl-launch { position: fixed; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 30px rgba(11,21,51,.25); transition: transform .2s, box-shadow .2s; }
.zl-wa { left: 20px; background: #25d366; color: #fff; }
.zl-wa svg { width: 30px; height: 30px; }
.zl-wa:hover { transform: translateY(-3px) scale(1.04); color: #fff; }
.zl-wa .zl-tip { position: absolute; left: 72px; white-space: nowrap; background: #fff; color: #0f1a35; font: 600 .85rem/1 var(--font, system-ui); padding: 10px 14px; border-radius: 999px; box-shadow: 0 8px 24px rgba(11,21,51,.14); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.zl-wa:hover .zl-tip, .zl-wa:focus-visible .zl-tip { opacity: 1; transform: none; }
.zl-launch { right: 20px; background: var(--primary, #2453ff); color: #fff; }
.zl-launch:hover { transform: translateY(-3px); }
.zl-launch svg { width: 28px; height: 28px; transition: transform .25s, opacity .2s; position: absolute; }
.zl-launch .i-close { opacity: 0; transform: rotate(-90deg); }
.zl-launch[aria-expanded="true"] .i-chat { opacity: 0; transform: rotate(90deg); }
.zl-launch[aria-expanded="true"] .i-close { opacity: 1; transform: none; }
.zl-launch .zl-badge { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent, #ffb21e); border: 2px solid #fff; }
.zl-launch[aria-expanded="true"] .zl-badge { display: none; }
.to-top { bottom: 92px !important; }

.zl-panel { position: fixed; right: 20px; bottom: 92px; z-index: 61; width: 380px; max-width: calc(100vw - 24px); height: min(600px, calc(100vh - 120px)); background: #fff; border-radius: 20px; box-shadow: 0 30px 70px rgba(11,21,51,.28); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right; pointer-events: none; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; font-family: var(--font, system-ui); }
.zl-panel.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
@media (max-width: 520px) { .zl-panel { right: 12px; left: 12px; width: auto; bottom: 88px; height: calc(100vh - 110px); } }

.zl-head { background: linear-gradient(130deg, var(--primary, #2453ff), var(--dark-3, #1a2b5e)); color: #fff; padding: 18px 18px 16px; display: flex; align-items: center; gap: 12px; }
.zl-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; position: relative; }
.zl-avatar svg { width: 22px; height: 22px; }
.zl-avatar::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: #3ee08f; border: 2px solid #2453ff; }
.zl-head strong { display: block; font-family: var(--font-h, inherit); font-size: 1rem; }
.zl-head small { opacity: .8; font-size: .8rem; }
.zl-x { margin-left: auto; background: rgba(255,255,255,.14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.zl-x svg { width: 16px; height: 16px; }

.zl-log { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f4f6fb; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.zl-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5; animation: zlIn .2s ease-out; word-wrap: break-word; }
.zl-msg p { margin: 0 0 .5em; }
.zl-msg p:last-child { margin: 0; }
.zl-msg a { color: var(--primary, #2453ff); font-weight: 600; }
.zl-bot { background: #fff; color: #0f1a35; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(11,21,51,.06); align-self: flex-start; }
.zl-user { background: var(--primary, #2453ff); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.zl-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.zl-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6c2; animation: zlDot 1s infinite; }
.zl-typing span:nth-child(2) { animation-delay: .15s; }
.zl-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes zlDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes zlIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.zl-chips { display: flex; flex-wrap: wrap; gap: 7px; align-self: flex-start; max-width: 100%; }
.zl-chip { background: #fff; border: 1px solid #d6ddf0; color: var(--primary, #2453ff); font: 600 .84rem/1.2 var(--font, system-ui); padding: 8px 12px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.zl-chip:hover { background: var(--primary, #2453ff); color: #fff; border-color: var(--primary, #2453ff); }
.zl-chip.wa { color: #128c4b; border-color: #bfe9cf; }
.zl-chip.wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.zl-chip svg { width: 14px; height: 14px; }

.zl-lead { background: #fff; border-radius: 16px; padding: 14px; display: grid; gap: 9px; align-self: stretch; box-shadow: 0 1px 2px rgba(11,21,51,.06); animation: zlIn .2s ease-out; }
.zl-lead input, .zl-lead textarea { width: 100%; font: inherit; font-size: .9rem; padding: 9px 11px; border: 1px solid #e3e8f2; border-radius: 10px; background: #f4f6fb; color: #0f1a35; }
.zl-lead textarea { min-height: 70px; resize: vertical; }
.zl-lead input:focus, .zl-lead textarea:focus { outline: none; border-color: var(--primary, #2453ff); background: #fff; }
.zl-lead label.zl-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .78rem; color: #56627d; font-weight: 400; margin: 0; font-family: inherit; }
.zl-lead label.zl-consent input { width: auto; margin-top: 2px; }
.zl-lead button { background: var(--primary, #2453ff); color: #fff; border: 0; border-radius: 999px; padding: 10px; font: 700 .9rem/1 var(--font-h, inherit); cursor: pointer; }
.zl-lead button:disabled { opacity: .6; cursor: default; }
.zl-lead .zl-err { color: #b42318; font-size: .8rem; margin: 0; }

.zl-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e3e8f2; background: #fff; }
.zl-form input { flex: 1; border: 1px solid #e3e8f2; background: #f4f6fb; border-radius: 999px; padding: 11px 16px; font: inherit; font-size: .93rem; color: #0f1a35; min-width: 0; }
.zl-form input:focus { outline: none; border-color: var(--primary, #2453ff); background: #fff; }
.zl-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary, #2453ff); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.zl-form button svg { width: 18px; height: 18px; }
.zl-foot { text-align: center; font-size: .72rem; color: #8a94ad; padding: 0 12px 10px; background: #fff; }
.zl-foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) { .zl-panel, .zl-msg, .zl-lead, .zl-launch svg { transition: none; animation: none; } }
@media print { .zl-wa, .zl-launch, .zl-panel { display: none !important; } }
