/* ===== Chat con el equipo (tipo WhatsApp): lanzador + panel. Los textos viven en chat.js ===== */
.mcr-chat-fab{position:fixed;right:22px;bottom:22px;z-index:900;display:flex;align-items:center;gap:10px;padding:8px 16px 8px 8px;border-radius:999px;background:#fff;border:1px solid rgba(26,55,96,.12);box-shadow:0 16px 36px -14px rgba(26,55,96,.5);cursor:pointer;font-family:'Instrument Sans',system-ui,sans-serif;text-align:left;transition:transform .2s,box-shadow .2s}
.mcr-chat-fab:hover{transform:translateY(-2px);box-shadow:0 20px 40px -14px rgba(26,55,96,.55)}
.mcr-chat-fab .av{position:relative;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#1A3760,#0C75FF);color:#fff;font-weight:800;font-size:13px;letter-spacing:.02em;display:flex;align-items:center;justify-content:center;flex:none}
.mcr-chat-fab .av i,.mcr-chat-hd .av i{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#25D366;border:2px solid #fff}
.mcr-chat-fab .av i.off,.mcr-chat-hd .av i.off{background:#F4A261}
.mcr-chat-fab .tx b{display:block;font-size:13.5px;color:#1A3760;line-height:1.2}
.mcr-chat-fab .tx span{display:block;font-size:11.5px;color:#25D366;font-weight:700;margin-top:2px}
.mcr-chat-fab .tx span.off{color:#B06A2A}
.mcr-chat-fab .wa{width:22px;height:22px;color:#25D366;flex:none;margin-left:2px}
.mcr-chat-fab.hide{display:none}
@media(max-width:768px){.mcr-chat-fab{right:14px;bottom:calc(16px + env(safe-area-inset-bottom,0px));padding:7px 14px 7px 7px}body.has-mbar .mcr-chat-fab{display:none}}
.mcr-chat{position:fixed;right:22px;bottom:92px;z-index:1002;width:380px;max-width:calc(100vw - 24px);height:620px;max-height:calc(100vh - 112px);background:#F2F2F2;border-radius:22px;box-shadow:0 30px 70px -30px rgba(26,55,96,.6);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(16px) scale(.98);pointer-events:none;visibility:hidden;transition:opacity .22s ease,transform .26s cubic-bezier(.4,0,.2,1),visibility 0s linear .26s;font-family:'Instrument Sans',system-ui,sans-serif;color:#1A3760}
.mcr-chat.open{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .22s ease,transform .26s cubic-bezier(.4,0,.2,1)}
@media(max-width:768px){.mcr-chat{right:0;left:0;bottom:0;width:100%;max-width:none;height:min(88vh,760px);height:min(88dvh,760px);max-height:none;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom,0px)}}
.mcr-chat-bg{position:fixed;inset:0;z-index:1001;background:rgba(26,55,96,.35);opacity:0;pointer-events:none;transition:opacity .22s}
.mcr-chat-bg.open{opacity:1;pointer-events:auto}
@media(min-width:769px){.mcr-chat-bg{display:none}}
.mcr-chat-hd{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 16px;background:#1A3760;color:#fff;flex:none}
.mcr-chat-hd .av{position:relative;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#F4876E,#FF623D);color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;flex:none}
.mcr-chat-hd .av i{border-color:#1A3760}
.mcr-chat-hd .who{flex:1;min-width:0}
.mcr-chat-hd .who b{display:block;font-size:15px;line-height:1.2}
.mcr-chat-hd .who span{display:block;font-size:12px;opacity:.85;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mcr-chat-hd .x{width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;font-size:22px;line-height:1;cursor:pointer;flex:none}
.mcr-chat-bd{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;padding:14px 12px;display:flex;flex-direction:column;gap:8px;background:#EFEAE2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='20' cy='20' r='1.6' fill='%231A3760' fill-opacity='.06'/%3E%3Ccircle cx='80' cy='60' r='1.6' fill='%231A3760' fill-opacity='.06'/%3E%3Ccircle cx='40' cy='100' r='1.6' fill='%231A3760' fill-opacity='.06'/%3E%3C/svg%3E")}
.mcr-day{align-self:center;font-size:11px;font-weight:700;letter-spacing:.04em;color:rgba(26,55,96,.6);background:rgba(255,255,255,.8);padding:4px 10px;border-radius:999px;margin-bottom:4px}
.mcr-msg{max-width:86%;padding:10px 12px 8px;border-radius:16px;font-size:14.5px;line-height:1.45;animation:mcrIn .25s ease both}
@keyframes mcrIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.mcr-msg.in{background:#fff;border-top-left-radius:6px;box-shadow:0 1px 2px rgba(0,0,0,.06);align-self:flex-start}
.mcr-msg.out{background:#DCF8C6;border-top-right-radius:6px;align-self:flex-end}
.mcr-msg time{display:block;font-size:10.5px;color:rgba(26,55,96,.5);margin-top:4px;text-align:right}
.mcr-msg .act{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px}
.mcr-msg .act a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 14px;border-radius:999px;font-size:13px;font-weight:700;text-decoration:none;background:linear-gradient(135deg,#F4876E,#FF623D);color:#fff}
.mcr-msg .act a.alt{background:#fff;color:#1A3760;border:1.5px solid rgba(26,55,96,.25)}
.mcr-msg .act a.wa{background:#25D366;color:#fff}
.mcr-chips{display:flex;flex-wrap:wrap;gap:8px;align-self:flex-start;max-width:100%;animation:mcrIn .25s ease both}
.mcr-chip{border:1.5px solid #1A3760;color:#1A3760;background:#fff;border-radius:999px;padding:8px 13px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit}
.mcr-chip:hover{background:#1A3760;color:#fff}
.mcr-typing{display:inline-flex;gap:4px;align-items:center;padding:12px 14px;background:#fff;border-radius:16px;border-top-left-radius:6px;align-self:flex-start}
.mcr-typing i{width:7px;height:7px;border-radius:50%;background:rgba(26,55,96,.4);animation:mcrDot 1.1s infinite}
.mcr-typing i:nth-child(2){animation-delay:.15s}.mcr-typing i:nth-child(3){animation-delay:.3s}
@keyframes mcrDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.mcr-chat-ft{display:flex;gap:8px;padding:10px 10px 6px;background:#fff;border-top:1px solid rgba(26,55,96,.08);flex:none}
.mcr-chat-ft input{flex:1;min-width:0;min-height:44px;border-radius:999px;border:1px solid rgba(26,55,96,.18);padding:0 16px;font-size:16px;font-family:inherit;color:#1A3760;background:#F7F8FB;outline:none}
.mcr-chat-ft input:focus{border-color:#25D366;box-shadow:0 0 0 3px rgba(37,211,102,.18)}
.mcr-chat-ft button{width:44px;height:44px;border-radius:50%;background:#25D366;color:#fff;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex:none}
.mcr-chat-note{font-size:11px;color:rgba(26,55,96,.55);text-align:center;padding:0 12px 10px;background:#fff;flex:none}
@media(prefers-reduced-motion:reduce){.mcr-chat,.mcr-msg,.mcr-chips{transition:none;animation:none}}
.mcr-chat-fab .av img,.mcr-chat-hd .av img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
/* v2: cabecera con llamar/WhatsApp, ticks, tarjetas de carros, formulario de llamada, aviso suave */
.mcr-chat-hd .ic{width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;background:rgba(255,255,255,.12);flex:none;text-decoration:none}
.mcr-chat-hd .ic svg{width:18px;height:18px}
.mcr-chat-hd .ic.wa{background:#25D366}
.mcr-msg time .tk{width:14px;height:14px;vertical-align:-3px;margin-left:4px;color:#34B7F1}
.mcr-cars{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:4px 2px 6px;margin:6px -4px 0;scroll-snap-type:x mandatory}
.mcr-car{flex:none;width:150px;scroll-snap-align:start;background:#F7F8FB;border:1px solid rgba(26,55,96,.1);border-radius:14px;padding:10px;text-decoration:none;color:#1A3760;display:flex;flex-direction:column;gap:4px}
.mcr-car img{width:100%;aspect-ratio:5/3;object-fit:contain;border-radius:8px;background:#fff}
.mcr-car b{font-size:13px;line-height:1.2}
.mcr-car span{font-size:12px;color:rgba(26,55,96,.7)}
.mcr-car em{font-style:normal;margin-top:4px;display:inline-block;text-align:center;font-size:12.5px;font-weight:800;color:#fff;background:linear-gradient(135deg,#F4876E,#FF623D);border-radius:999px;padding:6px 0}
.mcr-msg.in:has(.mcr-cars){max-width:100%;width:100%}
.mcr-chip.alt{border-color:rgba(26,55,96,.3);color:rgba(26,55,96,.75)}
.mcr-msg .cb{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.mcr-msg .cb input{min-height:42px;border:1px solid rgba(26,55,96,.2);border-radius:10px;padding:0 12px;font:inherit;font-size:16px;color:#1A3760;background:#F7F8FB}
.mcr-msg .cb button{min-height:42px;border:0;border-radius:999px;background:#1A3760;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.mcr-msg .cb button:disabled{opacity:.6}
.mcr-msg .cb small{color:#C0392B;font-size:12px;min-height:1em}
.mcr-chat-fab .badge{position:absolute;top:-4px;left:34px;min-width:18px;height:18px;border-radius:999px;background:#FF623D;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 5px;border:2px solid #fff}
.mcr-chat-fab{position:fixed}
/* Notificación tipo WhatsApp (arriba) */
.mcr-notif{--nx:-50%;position:fixed;top:calc(10px + env(safe-area-inset-top,0px));left:50%;z-index:950;width:min(430px,calc(100vw - 20px));display:flex;gap:10px;align-items:flex-start;padding:10px 36px 10px 12px;border-radius:20px;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:0 16px 44px -14px rgba(26,55,96,.5),0 0 0 1px rgba(26,55,96,.08);font-family:'Instrument Sans',system-ui,sans-serif;text-align:left;cursor:pointer;opacity:0;transform:translate(var(--nx),-140%);pointer-events:none;transition:transform .5s cubic-bezier(.2,.9,.3,1.15),opacity .3s;touch-action:pan-x}
.mcr-notif.show{opacity:1;transform:translate(var(--nx),0);pointer-events:auto}
.mcr-notif .av{width:40px;height:40px;border-radius:50%;overflow:hidden;flex:none;background:linear-gradient(135deg,#1A3760,#0C75FF);color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.mcr-notif .av img{width:100%;height:100%;object-fit:cover}
.mcr-notif .bd{min-width:0;flex:1}
.mcr-notif .hd{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:rgba(26,55,96,.6);white-space:nowrap;overflow:hidden}
.mcr-notif .hd b{color:#1A3760;font-weight:800;overflow:hidden;text-overflow:ellipsis}
.mcr-notif .hd time{font-variant-numeric:tabular-nums}
.mcr-notif p{margin:2px 0 0;font-size:14px;line-height:1.35;color:#1A3760;font-weight:600}
.mcr-notif .rp{display:inline-block;margin-top:5px;font-size:12px;font-weight:800;color:#0C75FF}
.mcr-notif .x{position:absolute;top:6px;right:6px;width:28px;height:28px;border:0;background:transparent;font-size:18px;line-height:1;color:rgba(26,55,96,.45);cursor:pointer;border-radius:50%}
.mcr-notif .x:active{background:rgba(26,55,96,.08)}
@media(min-width:769px){.mcr-notif{--nx:0;left:auto;right:22px;top:18px}}
.mcr-chat-fab.ping{animation:mcrPing .9s ease-out 3}
.mcr-chat-fab.ping .badge{animation:mcrBadge .5s cubic-bezier(.2,.9,.3,1.4)}
@keyframes mcrPing{0%{box-shadow:0 0 0 0 rgba(255,98,61,.55)}100%{box-shadow:0 0 0 20px rgba(255,98,61,0)}}
@keyframes mcrBadge{0%{transform:scale(.4)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.mcr-notif{transition:opacity .2s}.mcr-chat-fab.ping,.mcr-chat-fab.ping .badge{animation:none}}
