/* Asistente de D'Rosa · chat */
.dc-launch{position:fixed;right:22px;bottom:22px;z-index:60;display:inline-flex;align-items:center;gap:10px;border:0;cursor:pointer;
  background:var(--rose,#d91869);color:#fff;font:700 15px/1 var(--body,system-ui,sans-serif);padding:0 20px 0 16px;height:56px;border-radius:999px;
  box-shadow:0 10px 26px -8px rgba(217,24,105,.55),0 2px 6px rgba(43,22,48,.18);transition:transform .18s,background .18s}
.dc-launch:hover{background:var(--rose-dark,#a90f4f);transform:translateY(-2px)}
.dc-launch:focus-visible{outline:3px solid var(--ink,#2b1630);outline-offset:3px}
.dc-launch svg{width:26px;height:26px;flex:none}
.dc-launch[hidden]{display:none}

.dc-panel{position:fixed;right:22px;bottom:22px;z-index:61;width:390px;height:min(620px,calc(100vh - 44px));display:flex;flex-direction:column;
  background:var(--cream,#fdf9f5);border:1px solid var(--line,#ecdfd6);border-radius:24px;overflow:hidden;
  box-shadow:0 30px 70px -20px rgba(43,22,48,.45),0 2px 8px rgba(43,22,48,.12);
  font-family:var(--body,system-ui,sans-serif);color:var(--ink,#2b1630);transform-origin:bottom right;animation:dc-in .2s ease-out}
.dc-panel[hidden]{display:none}
@keyframes dc-in{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}

.dc-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:var(--ink,#2b1630);color:#fff}
.dc-ava{width:42px;height:42px;border-radius:50%;background:var(--rose,#d91869);display:grid;place-items:center;flex:none}
.dc-ava svg{width:24px;height:24px;color:#fff}
.dc-title{flex:1;min-width:0}
.dc-title b{display:block;font:600 17px/1.2 var(--head,system-ui,sans-serif)}
.dc-title span{display:flex;align-items:center;gap:6px;font-size:12.5px;opacity:.85;margin-top:3px}
.dc-title span::before{content:"";width:8px;height:8px;border-radius:50%;background:#9a8a98;flex:none}
.dc-title span.open::before{background:#5fd38b;box-shadow:0 0 0 3px rgba(95,211,139,.25)}
.dc-title span.closed::before{background:#f08a8a}
.dc-x{width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none}
.dc-x:hover{background:rgba(255,255,255,.2)}
.dc-x:focus-visible{outline:2px solid #fff;outline-offset:2px}
.dc-x svg{width:20px;height:20px}

.dc-note{margin:0;padding:9px 16px;font-size:12px;line-height:1.45;color:var(--ink-2,#5d4b60);background:var(--sand,#f6eee6);border-bottom:1px solid var(--line,#ecdfd6)}

.dc-log{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.dc-msg{max-width:86%;padding:10px 14px;border-radius:18px;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.dc-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line,#ecdfd6);border-bottom-left-radius:6px}
.dc-msg.user{align-self:flex-end;background:var(--rose,#d91869);color:#fff;border-bottom-right-radius:6px}
.dc-msg a{color:var(--rose-dark,#a90f4f);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.dc-msg.user a{color:#fff}
.dc-msg b{font-weight:800}

.dc-typing{display:inline-flex;gap:5px;align-items:center}
.dc-typing i{width:7px;height:7px;border-radius:50%;background:var(--ink-2,#5d4b60);opacity:.35;animation:dc-dot 1.1s infinite}
.dc-typing i:nth-child(2){animation-delay:.15s}.dc-typing i:nth-child(3){animation-delay:.3s}
@keyframes dc-dot{0%,60%,100%{opacity:.25;transform:none}30%{opacity:.9;transform:translateY(-3px)}}

.dc-cta{align-self:stretch;border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:8px;font-size:13.5px;line-height:1.45}
.dc-cta.llamar{background:var(--rose-tint,#fff3f8);border:1px solid var(--rose-soft,#fde7f0)}
.dc-cta.urgencias{background:#fff7e8;border:1px solid #f4dfb4}
.dc-cta p{margin:0 2px;color:var(--ink-2,#5d4b60)}
.dc-cta p strong{color:var(--ink,#2b1630)}
.dc-tel{display:flex;align-items:center;justify-content:space-between;gap:10px;text-decoration:none;border-radius:14px;padding:10px 14px;min-height:48px;font-weight:700;transition:transform .15s}
.dc-tel:hover{transform:translateY(-1px)}
.dc-tel.main{background:var(--rose,#d91869);color:#fff;justify-content:center;font-size:15px}
.dc-tel.main svg{width:18px;height:18px}
.dc-tel.er{background:#fff;color:var(--ink,#2b1630);border:1px solid #f0dcb0}
.dc-tel.er small{display:block;font-weight:400;font-size:12px;color:var(--ink-2,#5d4b60)}
.dc-tel.er .n{color:var(--rose,#d91869);white-space:nowrap;font-size:15px}
.dc-tel:focus-visible{outline:3px solid var(--ink,#2b1630);outline-offset:2px}

.dc-chips{display:flex;flex-wrap:wrap;gap:8px;padding:2px 14px 10px}
.dc-chips[hidden]{display:none}
.dc-chip{border:1px solid var(--rose-soft,#fde7f0);background:#fff;color:var(--rose-dark,#a90f4f);font:700 13px/1 var(--body,system-ui,sans-serif);padding:9px 12px;border-radius:999px;cursor:pointer}
.dc-chip:hover{background:var(--rose-tint,#fff3f8);border-color:var(--rose,#d91869)}
.dc-chip:focus-visible{outline:2px solid var(--rose,#d91869);outline-offset:2px}

.dc-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 12px;border-top:1px solid var(--line,#ecdfd6);background:#fff}
.dc-form textarea{flex:1;resize:none;border:1px solid var(--line,#ecdfd6);border-radius:16px;padding:11px 14px;font:15px/1.4 var(--body,system-ui,sans-serif);color:var(--ink,#2b1630);background:var(--cream,#fdf9f5);max-height:120px;min-height:46px}
.dc-form textarea:focus{outline:2px solid var(--rose,#d91869);outline-offset:0;border-color:transparent}
.dc-send{width:46px;height:46px;border:0;border-radius:50%;background:var(--rose,#d91869);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none}
.dc-send:disabled{opacity:.45;cursor:default}
.dc-send:focus-visible{outline:3px solid var(--ink,#2b1630);outline-offset:2px}
.dc-send svg{width:20px;height:20px}
.dc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:640px){
  .dc-launch{right:14px;bottom:calc(82px + env(safe-area-inset-bottom));width:56px;padding:0;justify-content:center}
  .dc-launch .dc-lbl{display:none}
  .dc-panel{inset:0;width:auto;height:auto;border-radius:0;border:0;z-index:70}
  .dc-head{padding-top:calc(14px + env(safe-area-inset-top))}
  .dc-form{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .dc-form textarea{font-size:16px} /* evita el zoom automático en iPhone */
}
@media (prefers-reduced-motion:reduce){.dc-panel{animation:none}.dc-typing i{animation:none;opacity:.6}.dc-log{scroll-behavior:auto}}
@media print{.dc-launch,.dc-panel{display:none!important}}
