/* Assistente AI Ke-RETE – widget di chat (usa le variabili colore del sito, anche tema Business) */
#kr-chat{--krc-accent:var(--kr-purple,#7104cf);--krc-dark:var(--kr-purple-dark,#51009a);--krc-ink:var(--kr-ink,#211132);--krc-muted:var(--kr-muted,#655c70);--krc-line:var(--kr-line,#e5dfed);--krc-soft:var(--kr-soft,#f6f3fa);position:fixed;right:20px;bottom:20px;z-index:2147483000;font-family:'DM Sans',Arial,sans-serif}
.kr-chat-launcher{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;padding:13px 20px 13px 16px;background:var(--krc-accent);color:#fff;font-weight:600;font-size:15px;box-shadow:0 12px 30px rgba(20,8,40,.28);cursor:pointer;transition:transform .2s,background .2s}
.kr-chat-launcher i{font-size:21px}
.kr-chat-launcher:hover{background:var(--krc-dark);transform:translateY(-2px)}
.kr-chat-launcher:focus-visible,.kr-chat-panel button:focus-visible,.kr-chat-panel a:focus-visible,.kr-chat-panel textarea:focus-visible{outline:3px solid var(--kr-yellow,#ffc928);outline-offset:2px}
#kr-chat.is-open .kr-chat-launcher{display:none}
.kr-chat-panel{position:absolute;right:0;bottom:0;width:390px;max-width:calc(100vw - 24px);height:min(620px,calc(100vh - 40px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--krc-line);border-radius:22px;box-shadow:0 24px 60px rgba(20,8,40,.25);overflow:hidden;color:var(--krc-ink)}
.kr-chat-panel[hidden]{display:none}
.kr-chat-head{display:flex;align-items:center;gap:12px;padding:16px 16px 14px 18px;background:linear-gradient(135deg,var(--krc-dark),var(--krc-accent));color:#fff}
.kr-chat-head div{flex:1;line-height:1.25}
.kr-chat-head strong{display:block;font-size:16px}
.kr-chat-head small{font-size:12.5px;opacity:.85}
.kr-chat-avatar{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:18px}
.kr-chat-close{border:0;background:transparent;color:#fff;font-size:22px;width:38px;height:38px;border-radius:50%;cursor:pointer}
.kr-chat-close:hover{background:rgba(255,255,255,.15)}
.kr-chat-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--krc-soft);scroll-behavior:smooth}
.kr-chat-msg{max-width:88%;padding:10px 14px;border-radius:16px;font-size:14.5px;line-height:1.5;word-wrap:break-word}
.kr-chat-msg p{margin:0 0 6px}.kr-chat-msg p:last-child{margin:0}
.kr-chat-msg ul{margin:4px 0 6px;padding-left:18px}.kr-chat-msg li{margin:2px 0}
.kr-chat-bot{align-self:flex-start;background:#fff;border:1px solid var(--krc-line);border-bottom-left-radius:4px}
.kr-chat-bot a{color:var(--krc-accent);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.kr-chat-user{align-self:flex-end;background:var(--krc-accent);color:#fff;border-bottom-right-radius:4px}
.kr-chat-typing{display:flex;gap:4px;align-items:center;padding:14px}
.kr-chat-typing span:not(.visually-hidden){width:7px;height:7px;border-radius:50%;background:var(--krc-muted);opacity:.5;animation:krc-dot 1.1s infinite}
.kr-chat-typing span:nth-child(2){animation-delay:.15s}.kr-chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes krc-dot{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-4px);opacity:.9}}
.kr-chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px 0;background:var(--krc-soft)}
.kr-chat-chips[hidden]{display:none}
.kr-chat-chip{border:1px solid var(--krc-line);background:#fff;color:var(--krc-accent);border-radius:999px;padding:6px 12px;font-size:13px;font-weight:600;cursor:pointer}
.kr-chat-chip:hover{border-color:var(--krc-accent)}
.kr-chat-form{display:flex;align-items:flex-end;gap:8px;padding:12px 14px 4px;border-top:1px solid var(--krc-line);background:#fff}
.kr-chat-form textarea{flex:1;resize:none;border:1px solid var(--krc-line);border-radius:14px;padding:10px 12px;font:inherit;font-size:14.5px;line-height:1.4;max-height:120px;color:var(--krc-ink)}
.kr-chat-form textarea:focus{border-color:var(--krc-accent);outline:none}
.kr-chat-send{flex:none;width:42px;height:42px;border:0;border-radius:50%;background:var(--krc-accent);color:#fff;font-size:17px;cursor:pointer}
.kr-chat-send:disabled{opacity:.5;cursor:wait}
.kr-chat-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.kr-chat-meta{margin:0;padding:0 16px;min-height:4px;font-size:12px;color:var(--krc-muted);background:#fff}
.kr-chat-privacy{margin:0;padding:4px 16px 12px;font-size:11.5px;line-height:1.45;color:var(--krc-muted);background:#fff}
.kr-chat-privacy a{color:var(--krc-accent);text-decoration:underline}
@media (max-width:560px){
  #kr-chat{right:12px;bottom:12px}
  .kr-chat-launcher span{display:none}
  .kr-chat-launcher{padding:15px}
  #kr-chat.is-open{left:0;right:0;bottom:0;top:auto}
  .kr-chat-panel{position:fixed;left:0;right:0;bottom:0;width:100%;max-width:none;height:min(88vh,100%);height:min(88dvh,100%);border-radius:20px 20px 0 0}
}
@media (prefers-reduced-motion:reduce){.kr-chat-launcher,.kr-chat-log{transition:none;scroll-behavior:auto}.kr-chat-typing span{animation:none}}
@media print{#kr-chat{display:none}}
/* Isolamento dagli stili generali del sito */
#kr-chat p,#kr-chat li,#kr-chat ul,#kr-chat strong,#kr-chat small{font-family:inherit;letter-spacing:normal}
#kr-chat .kr-chat-msg p,#kr-chat .kr-chat-msg li{font-size:14.5px;line-height:1.5;color:inherit;margin:0 0 6px}
#kr-chat .kr-chat-msg p:last-child{margin-bottom:0}
#kr-chat .kr-chat-bot{color:var(--krc-ink)}
#kr-chat .kr-chat-user,#kr-chat .kr-chat-user p{color:#fff}
#kr-chat .kr-chat-privacy{font-size:11.5px;line-height:1.45;color:var(--krc-muted);margin:0}
#kr-chat .kr-chat-meta{font-size:12px;line-height:1.3;margin:0}
#kr-chat .kr-chat-head strong{font-size:16px;color:#fff;margin:0}
#kr-chat .kr-chat-head small{font-size:12.5px;color:rgba(255,255,255,.85)}
#kr-chat .kr-chat-chip{line-height:1.2}
/* Pagina Condizioni generali */
.kr-cg-index{background:var(--kr-soft,#f6f3fa);border-radius:18px;padding:22px 26px;margin:26px 0 10px}
.kr-cg-index h2{margin-top:0!important}
.kr-cg-index ol{columns:2;column-gap:32px;padding-left:0;list-style:none;margin:0}
.kr-cg-index li{break-inside:avoid;margin:0 0 6px;font-size:.95rem}
.kr-cg section{scroll-margin-top:110px}
@media (max-width:700px){.kr-cg-index ol{columns:1}}
