/* 24-7 Abogados — estilos del chat de intake (port del ChatWidget de LawIntaker) */
.a247-chat-root{position:fixed;right:.5rem;bottom:.5rem;z-index:60;font-family:-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
.a247-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Botón flotante */
.a247-chat-launch{position:relative;display:flex;justify-content:center;min-width:9rem;border:0;border-radius:999px;background:#25d366;color:#fff;padding:1rem 1.75rem;font-size:.875rem;font-weight:900;cursor:pointer;box-shadow:0 18px 34px rgba(6,40,25,.32);transition:transform .15s ease,background .15s ease}
.a247-chat-launch:hover{background:#20bd5a;transform:translateY(-2px)}
.a247-chat-launch-avatar{position:absolute;top:-2.75rem;left:50%;transform:translateX(-50%);background:#fff;padding:4px;border-radius:999px;box-shadow:0 10px 22px rgba(0,0,0,.22);line-height:0}
.a247-chat-launch-avatar img{width:4rem;height:4rem;border-radius:999px;object-fit:cover;object-position:32% 35%}
.a247-chat-launch-badge{position:absolute;right:-4px;bottom:-4px;background:#075e54;color:#fff;border:2px solid #fff;border-radius:999px;font-size:.72rem;line-height:1;padding:.32rem}
.a247-chat-launch-text{padding-top:.5rem}

/* Panel */
.a247-chat-panel{position:relative;display:flex;flex-direction:column;width:calc(100vw - 1rem);max-width:390px;height:min(680px,calc(100svh - 1rem));overflow:hidden;border-radius:22px;border:1px solid rgba(255,255,255,.15);background:#10293f;box-shadow:0 24px 50px rgba(0,0,0,.4);margin-bottom:1rem;color:#1d2731}
.a247-chat-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 18%}
.a247-chat-shade{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(10,25,40,.5),rgba(10,25,40,.1) 45%,rgba(10,25,40,.84));pointer-events:none}
.a247-chat-header{position:relative;z-index:2;padding:.75rem;color:#fff}
.a247-chat-id{display:flex;align-items:center;gap:.75rem}
.a247-chat-avatar{width:3rem;height:3rem;border-radius:999px;border:2px solid rgba(255,255,255,.8);object-fit:cover;object-position:32% 35%;box-shadow:0 6px 14px rgba(0,0,0,.3)}
.a247-chat-id h2{margin:0;font-size:1.125rem;font-weight:900;line-height:1.15;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.4)}
.a247-chat-id p{margin:.15rem 0 0;font-size:.72rem;font-weight:800;line-height:1.3;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.4)}
.a247-chat-tools{position:absolute;top:.75rem;right:.75rem;display:flex;gap:.4rem}
.a247-tool{border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#33424f;width:2rem;height:2rem;font-size:.85rem;cursor:pointer;line-height:1}
.a247-tool:hover{background:#fff}

.a247-chat-scroll{position:relative;z-index:2;flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:.75rem;overflow-y:auto;padding:2.5rem 1rem 1rem}
.a247-intro{margin-top:auto;background:rgba(10,25,40,.93);border:1px solid rgba(255,255,255,.2);border-radius:24px;padding:1rem;box-shadow:0 12px 26px rgba(0,0,0,.3)}
.a247-intro-text{margin:0 0 .75rem;font-size:1rem;font-weight:900;line-height:1.3;color:#fff}
.a247-topics{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.a247-topic{display:flex;align-items:center;gap:.45rem;border:2px solid #2f80ed;background:#fff;border-radius:999px;padding:.5rem .7rem;text-align:left;font-size:.72rem;font-weight:900;color:#10293f;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.a247-topic:hover{background:#eef5ff}
.a247-topic:disabled{opacity:.5;cursor:not-allowed}
.a247-topic-dot{flex:none;width:.8rem;height:.8rem;border-radius:999px;border:2px solid #2f80ed}
.a247-row{display:flex}
.a247-row-user{justify-content:flex-end}
.a247-row-assistant{justify-content:flex-start}
.a247-bubble{max-width:86%;border-radius:8px;padding:.75rem 1rem;font-size:.875rem;font-weight:600;line-height:1.55;box-shadow:0 2px 6px rgba(0,0,0,.16)}
.a247-bubble p{margin:0;white-space:pre-wrap}
.a247-bubble-user{background:#d9fdd3;color:#10240f;border-bottom-right-radius:2px}
.a247-bubble-assistant{background:#fff;color:#26313c;border:1px solid #eef2f5;border-bottom-left-radius:2px}
.a247-typing{display:flex;align-items:center;gap:.5rem;color:#5a6a77;font-weight:700}
.a247-spinner{width:1rem;height:1rem;flex:none;border-radius:999px;border:2px solid #cfe3dc;border-top-color:#128c7e;animation:a247spin 0.8s linear infinite}
@keyframes a247spin{to{transform:rotate(360deg)}}

.a247-chat-footer{position:relative;z-index:2;background:rgba(255,255,255,.94);border-top:1px solid rgba(255,255,255,.1);padding:.75rem;backdrop-filter:blur(6px)}
.a247-chat-root [hidden]{display:none !important}
.a247-chat-error{margin:0 0 .75rem;border-radius:8px;background:#fbe9e7;border:1px solid #d99a92;color:#7c241c;padding:.55rem .8rem;font-size:.875rem;font-weight:700}
.a247-chat-complete{border-radius:16px;border:1px solid #bfe6cc;background:#e5f4e8;color:#14532d;padding:.8rem 1rem;font-size:.875rem;font-weight:700;line-height:1.45}
.a247-chat-complete a{color:#14532d;text-decoration:underline}
.a247-chat-quick{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
.a247-quick{border:1px solid #cfd9e1;background:#fff;color:#33424f;border-radius:999px;padding:.5rem .8rem;font-size:.72rem;font-weight:900;cursor:pointer}
.a247-quick:hover{border-color:#128c7e;color:#075e54}
.a247-quick-active{border-color:#128c7e;background:#dcf8c6;color:#075e54}
.a247-chat-consent{display:flex;gap:.5rem;border:1px solid #cfd9e1;background:#fff;border-radius:12px;padding:.75rem;margin-bottom:.5rem;font-size:.68rem;font-weight:600;line-height:1.45;color:#44545f;cursor:pointer}
.a247-chat-consent input{margin-top:.15rem;width:1rem;height:1rem;flex:none;accent-color:#128c7e}
.a247-chat-consent a{color:#075e54;font-weight:900}
.a247-chat-form{display:flex;align-items:flex-end;gap:.5rem}
.a247-chat-form input{min-width:0;flex:1;border:1px solid #cfd9e1;border-radius:999px;background:#fff;padding:.75rem 1rem;font-size:.875rem;font-weight:600;color:#1d2731;outline:none}
.a247-chat-form input:focus{border-color:#128c7e;box-shadow:0 0 0 3px #dcf2e4}
.a247-chat-send{flex:none;border:0;border-radius:999px;background:#2f80ed;color:#fff;width:2.9rem;height:2.9rem;font-size:1.05rem;cursor:pointer}
.a247-chat-send:hover{background:#1f6fd6}
.a247-chat-send:disabled{background:#b9c7d2;cursor:not-allowed}
.a247-chat-disclaimer{margin:.5rem 0 0;text-align:center;font-size:.62rem;font-weight:600;line-height:1.4;color:#5a6a77}

@media(min-width:640px){
  .a247-chat-root{right:1.5rem;bottom:1.5rem}
  .a247-chat-panel{height:min(720px,calc(100vh - 2rem));width:calc(100vw - 2rem)}
  .a247-chat-scroll{padding-top:4rem}
}
