/* Alph · asistente de Alpha Seguros (widget de chat) */
.alph-root{--a-navy:#16303F;--a-navy-deep:#0F232E;--a-cyan:#2E9BD6;--a-coral:#FF6B4A;--a-green:#1F9D63;--a-bg:#E9EFF2;--a-line:#E1E8EC;--a-ink:#14232D;--a-soft:#5B6B77;
  font-family:'Outfit','Segoe UI',system-ui,sans-serif;color:var(--a-ink);-webkit-font-smoothing:antialiased;}
.alph-root *,.alph-root *::before,.alph-root *::after{box-sizing:border-box;}
.alph-root button{font-family:inherit;}

/* ---------- Botón flotante ---------- */
.alph-launch{position:fixed;right:20px;bottom:20px;bottom:calc(20px + env(safe-area-inset-bottom));z-index:61;display:flex;align-items:center;gap:10px;
  height:58px;padding:0 20px 0 7px;border:0;border-radius:999px;background:var(--a-navy);color:#fff;cursor:pointer;
  box-shadow:0 12px 30px -8px rgba(15,35,46,.55);opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .35s ease,transform .35s ease,background .15s ease;}
.alph-launch.is-in{opacity:1;transform:none;pointer-events:auto;}
.alph-launch:hover{background:var(--a-navy-deep);}
.alph-launch:focus-visible,.alph-root button:focus-visible,.alph-root a:focus-visible,.alph-root textarea:focus-visible{outline:3px solid var(--a-cyan);outline-offset:2px;}
.alph-launch .alph-av{width:44px;height:44px;}
.alph-launch-txt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;text-align:left;}
.alph-launch-txt b{font-size:16px;font-weight:600;}
.alph-launch-txt span{font-size:12.5px;opacity:.8;font-weight:400;}
.alph-root.is-open .alph-launch{opacity:0;pointer-events:none;transform:translateY(14px);}

.alph-av{position:relative;flex:none;border-radius:50%;background:var(--a-navy);display:flex;align-items:center;justify-content:center;}
.alph-av svg{width:78%;height:78%;}
.alph-av::after{content:"";position:absolute;right:1px;bottom:1px;width:11px;height:11px;border-radius:50%;background:#3DDC84;border:2px solid var(--a-navy);}
.alph-launch .alph-av{background:#1E3D4F;}

/* Con Alph activo no se muestra el botón flotante de WhatsApp (el del encabezado queda) */
html.alph-on .wa-float{display:none !important;}

/* Globito una vez por visita */
.alph-tip{position:fixed;right:20px;bottom:92px;bottom:calc(92px + env(safe-area-inset-bottom));z-index:61;max-width:250px;display:flex;align-items:flex-start;gap:8px;
  background:#fff;border-radius:14px 14px 4px 14px;padding:11px 10px 11px 14px;font-size:14.5px;line-height:1.35;color:var(--a-navy);
  box-shadow:0 10px 30px -8px rgba(15,35,46,.35);animation:alphUp .35s ease both;}
.alph-tip button{border:0;background:transparent;color:var(--a-soft);font-size:18px;line-height:1;padding:0 4px;cursor:pointer;}
.alph-tip span{cursor:pointer;}
@keyframes alphUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}

/* ---------- Panel del chat ---------- */
.alph-panel{position:fixed;right:20px;bottom:20px;bottom:calc(20px + env(safe-area-inset-bottom));z-index:1001;width:392px;height:min(660px,calc(100vh - 40px));
  display:flex;flex-direction:column;background:#fff;border-radius:22px;overflow:hidden;box-shadow:0 24px 60px -12px rgba(15,35,46,.45);
  opacity:0;transform:translateY(16px) scale(.98);transform-origin:bottom right;pointer-events:none;visibility:hidden;transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;}
.alph-root.is-open .alph-panel{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .22s ease,transform .22s ease;}

.alph-head{background:var(--a-navy);color:#fff;padding:13px 10px 13px 14px;display:flex;align-items:center;gap:11px;flex:none;}
.alph-head .alph-av{width:42px;height:42px;background:#1E3D4F;}
.alph-head-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;}
.alph-head-txt b{font-size:16.5px;font-weight:600;}
.alph-head-txt span{font-size:12.5px;opacity:.8;}
.alph-icon{width:38px;height:38px;border:0;border-radius:50%;background:transparent;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none;}
.alph-icon:hover{background:rgba(255,255,255,.12);}
.alph-icon svg{width:21px;height:21px;}
.alph-back{display:none;}

.alph-body{flex:1;overflow-y:auto;background:var(--a-bg);padding:14px 12px 10px;display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain;scroll-behavior:smooth;}
.alph-note{align-self:center;max-width:92%;text-align:center;font-size:12px;line-height:1.4;color:var(--a-soft);background:#fff;border-radius:9px;padding:5px 11px;}
.alph-msg{max-width:84%;padding:8px 11px 6px;font-size:15px;line-height:1.42;border-radius:4px 13px 13px 13px;background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.06);white-space:pre-line;overflow-wrap:anywhere;animation:alphUp .2s ease both;}
.alph-msg.me{align-self:flex-end;background:#D6EEFA;border-radius:13px 4px 13px 13px;}
.alph-msg.bot{align-self:flex-start;}
.alph-msg a{color:#1C7FB0;font-weight:600;text-decoration:underline;text-underline-offset:2px;}
.alph-msg img{display:block;width:100%;max-width:260px;border-radius:9px;margin:2px 0 6px;cursor:zoom-in;}
.alph-t{display:block;text-align:right;font-size:11px;color:#7A8A94;margin-top:2px;}
.alph-msg.me .alph-t{color:#5B7A8C;}

.alph-typing{align-self:flex-start;background:#fff;border-radius:4px 13px 13px 13px;padding:12px 14px;display:flex;gap:4px;box-shadow:0 1px 0 rgba(0,0,0,.06);}
.alph-typing i{width:7px;height:7px;border-radius:50%;background:#9AAAB4;animation:alphDot 1.2s infinite ease-in-out;}
.alph-typing i:nth-child(2){animation-delay:.15s;}.alph-typing i:nth-child(3){animation-delay:.3s;}
@keyframes alphDot{0%,60%,100%{transform:translateY(0);opacity:.5;}30%{transform:translateY(-4px);opacity:1;}}

.alph-chips{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0 4px;}
.alph-chip{border:1px solid var(--a-cyan);background:#fff;color:var(--a-navy);border-radius:999px;padding:7px 12px;font-size:13.5px;font-weight:500;cursor:pointer;transition:background .15s ease;}
.alph-chip:hover{background:#EAF6FD;}

.alph-wa{align-self:flex-start;max-width:88%;background:#fff;border-radius:13px;padding:11px;box-shadow:0 1px 0 rgba(0,0,0,.06);display:flex;flex-direction:column;gap:8px;animation:alphUp .25s ease both;}
.alph-wa p{margin:0;font-size:13px;color:var(--a-soft);line-height:1.4;}
.alph-wa a{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--a-green);color:#fff;text-decoration:none;font-weight:600;font-size:15px;border-radius:10px;padding:11px 14px;}
.alph-wa a:hover{background:#188553;}
.alph-wa a svg{width:19px;height:19px;flex:none;}

.alph-foot{display:flex;align-items:flex-end;gap:8px;padding:10px 10px 12px;background:#fff;border-top:1px solid var(--a-line);flex:none;}
.alph-foot textarea{flex:1;resize:none;border:1px solid #D8E0E6;background:#F6F8FA;border-radius:22px;padding:11px 16px;font:inherit;font-size:16px;line-height:1.35;color:var(--a-ink);max-height:120px;min-height:46px;}
.alph-foot textarea::placeholder{color:#7A8A94;}
.alph-send{width:46px;height:46px;border-radius:50%;border:0;background:var(--a-navy);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none;transition:background .15s ease,opacity .15s ease;}
.alph-send:hover{background:var(--a-navy-deep);}
.alph-send:disabled{opacity:.45;cursor:default;}
.alph-send svg{width:19px;height:19px;}
.alph-legal{flex:none;background:#fff;text-align:center;font-size:11px;color:#8695A0;padding:0 12px 8px;margin-top:-4px;}
.alph-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

/* Imagen ampliada */
.alph-zoom{position:fixed;inset:0;z-index:1002;background:rgba(10,22,30,.82);display:flex;align-items:center;justify-content:center;padding:20px;cursor:zoom-out;}
.alph-zoom img{max-width:100%;max-height:100%;border-radius:10px;}

/* ---------- Accesos dentro de las páginas ---------- */
.alph-cta{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:22px 0 0;padding:16px 18px;background:#fff;border:1.5px solid #DCE6EC;border-radius:16px;font-family:'Outfit','Segoe UI',sans-serif;}
.alph-cta-txt{display:flex;align-items:center;gap:12px;min-width:0;}
.alph-cta-txt .alph-av{width:40px;height:40px;}
.alph-cta-txt .alph-av::after{width:10px;height:10px;}
.alph-cta strong{display:block;font-size:16px;color:#0F232E;line-height:1.3;}
.alph-cta small{display:block;font-size:13.5px;color:#4E6672;line-height:1.4;margin-top:2px;}
.alph-cta button{border:0;background:#16303F;color:#fff;border-radius:999px;padding:11px 18px;font:inherit;font-size:14.5px;font-weight:600;cursor:pointer;white-space:nowrap;}
.alph-cta button:hover{background:#0F232E;}

/* ---------- Página propia (/alph/) ---------- */
.alph-root.is-embed .alph-launch,.alph-root.is-embed .alph-tip{display:none;}
.alph-root.is-embed .alph-panel{position:relative;right:auto;bottom:auto;width:100%;height:680px;max-height:none;opacity:1;transform:none;pointer-events:auto;visibility:visible;box-shadow:0 20px 50px rgba(22,48,63,.18);border-radius:24px;transition:none;}
.alph-root.is-embed .alph-close{display:none;}
.alph-root.is-embed .alph-panel{z-index:1;}
/* Con el menú del celular abierto, Alph se esconde (igual que el botón de WhatsApp) */
html.hdr-lock .alph-launch,html.hdr-lock .alph-tip{display:none;}

/* ---------- Celular ---------- */
@media (max-width:560px){
  .alph-launch{right:16px;bottom:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:56px;height:56px;padding:0;justify-content:center;}
  .alph-launch .alph-av{width:56px;height:56px;background:var(--a-navy);}
  .alph-launch-txt{display:none;}
  .alph-tip{right:16px;bottom:84px;bottom:calc(84px + env(safe-area-inset-bottom));}
  .alph-panel{right:0;bottom:0;width:100%;height:100%;height:100dvh;border-radius:0;}
  .alph-back{display:flex;}
  .alph-close{display:none;}
  .alph-head{padding:12px 10px 12px 6px;padding-top:calc(12px + env(safe-area-inset-top));}
  .alph-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom));}
  .alph-root.is-embed .alph-panel{height:calc(100dvh - 150px);min-height:480px;border-radius:18px;}
  .alph-root.is-embed .alph-back{display:none;}
  html.alph-lock,html.alph-lock body{overflow:hidden;}
}
@media (prefers-reduced-motion:reduce){
  .alph-launch,.alph-panel,.alph-msg,.alph-tip,.alph-wa{transition:none;animation:none;}
  .alph-typing i{animation:none;}
}
@media print{.alph-root,.alph-cta{display:none !important;}}
