@charset "UTF-8";

/* =========================
   FONT (unchanged)
   ========================= */
@font-face{
  font-family:'DM Sans';
  src:url('../fonts/DMSans-Regular.woff2') format('woff2'),
      url('../fonts/DMSans-Regular.woff') format('woff');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'DM Sans';
  src:url('../fonts/DMSans-Medium.woff2') format('woff2'),
      url('../fonts/DMSans-Medium.woff') format('woff');
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'DM Sans';
  src:url('../fonts/DMSans-Bold.woff2') format('woff2'),
      url('../fonts/DMSans-Bold.woff') format('woff');
  font-weight:700; font-style:normal; font-display:swap;
}

/* Rendering più nitido */
html{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   THEME (Zik — tema CHIARO, allineato al portale)
   ========================= */
:root{
  --zik-bg1: #F7FAFF;
  --zik-bg2: #EEF4FC;
  --zik-panel: #fff;
  --zik-bubble: #FFFFFF;
  --zik-text: #0F172A;
  --zik-muted: #64748B;

  --zik-accent1: #2ECF9A;
  --zik-accent2: #22a67a;
  --zik-user: #2ECF9A;
  --zik-userText: #FFFFFF;

  --zik-btn: #2ECF9A;
  --zik-btnHover: #22a67a;
  --zik-link: #0d9488;

  --zik-shadow: 0 1px 3px rgba(15,23,42,.08);
  --zik-radius: 25px;
}

/* =========================
   BASE
   ========================= */
body{
  margin:0;
  padding:0;
  font-family:'DM Sans', Arial, sans-serif;
  font-weight:400;
  letter-spacing:.2px;
  background: var(--zik-bg1);
  color: var(--zik-text);
}

/* =========================
   HEADER chatbot (tema chiaro)
   ========================= */
/* Header chatbot tema CHIARO (come portale) */
.zik-header{
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
  padding: 10px 0;
  box-shadow: 0 1px 0 rgba(15,23,42,.06);
}
.zik-header__inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  max-width: 480px;
  margin: 0 auto;
}
.zik-header__brand{
  display: flex;
  align-items: center;
  gap: 10px;
}
.zik-header__logo{
  height: 32px;
  width: auto;
  display: block;
}
.zik-header__logo--teal{ }
.zik-header__by{
  font-size: 13px;
  color: var(--zik-muted);
  font-weight: 500;
}
.zik-header__btn{
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--zik-accent1);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  transition: background .18s, transform .1s;
}
.zik-header__btn:hover{
  background: var(--zik-btnHover);
  color: #fff;
  transform: scale(1.02);
}

.zik-banner{
  background: rgba(241,245,253,.95);
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--zik-text);
}
.zik-banner strong{ color: var(--zik-text); }

#logo-container{
  position:fixed;
  top:0; left:0;
  width:100%;
  background:#fff;
  padding:5px 30px;
  box-shadow:0 2px 5px rgba(0,0,0,.10);
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-sizing:border-box;
  overflow:hidden;
}
#logo-container img{
  max-height:40px;
  max-width:45%;
  object-fit:contain;
  height:auto; width:auto;
}

/* =========================
   CHAT AREA
   ========================= */
#chat-container{
  display:flex;
  justify-content:center;
  padding:5px;
  position:relative;
  background: var(--zik-bg1);
}

/* Layout IAVOD per chatbot (welcome + chat-scroll + input fisso) */
.chat-app-wrap{
  flex-direction:column;
  max-width:480px;
  margin:0 auto;
  width:100%;
  min-height:60vh;
  overflow:hidden;
}
.chat-app-wrap .zik-chat-scroll{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  padding:10px 12px 100px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.chat-app-wrap .zik-welcome{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:24px 16px 16px;
  gap:12px;
}
.chat-app-wrap .welcome-title{
  font-size:1.35rem;
  font-weight:700;
  color: var(--zik-text);
  line-height:1.3;
}
.chat-app-wrap .welcome-sub{
  font-size:.85rem;
  color: var(--zik-muted);
}
.chat-app-wrap .zik-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  max-width:340px;
  justify-content:center;
}
.chat-app-wrap .zik-chips .chip{
  box-sizing:border-box;
  background:#fff;
  border:1.5px solid var(--zik-accent1);
  border-radius:20px;
  padding:10px 14px;
  font-size:.8rem;
  color: var(--zik-text);
  cursor:pointer;
  transition:all .18s;
  text-align:center;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1.3;
  white-space:normal;
  word-break:break-word;
}
.chat-app-wrap .zik-chips .chip:hover{
  border-color:var(--zik-accent1);
  background:rgba(46,207,154,.1);
  color: var(--zik-text);
  transform:translateY(-1px);
}
/* Allineato a botflow: msg-row, bubble, typing-bubble compatti */
.msg-row{ display:flex; gap:8px; max-width:96%; width:100%; animation:msgIn .25s ease; }
.msg-row.user{ align-self:flex-end; flex-direction:row-reverse; }
.msg-row.bot{ align-self:flex-start; }
.msg-row .avatar{ width:32px; height:32px; border-radius:50%; flex-shrink:0; margin-top:2px; }
.msg-row .av-bot{
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--zik-accent1);
  border: none;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 8px rgba(46,207,154,.35);
}
.av-bot__letter{
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.msg-row .av-bot img{ width:100%; height:100%; object-fit:contain; }
.msg-row .av-user{ background:#222; color:#fff; display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:800; }
.msg-row .bubble{
  padding:10px 14px;
  border-radius:18px;
  font-size:1rem;
  line-height:1.55;
  word-break:break-word;
}
.msg-row.user .bubble{ background:var(--zik-user); color:var(--zik-userText); border-bottom-right-radius:5px; }
.msg-row.bot .bubble{ background:var(--zik-bubble); color:var(--zik-text); border:1px solid rgba(15,23,42,.08); border-bottom-left-radius:5px; box-shadow:0 1px 4px rgba(15,23,42,.06); }
.msg-row .bubble strong{ font-weight:700; }
/* Blocco privacy: pulsante dentro lo stesso bubble, tutto allineato a sinistra */
.msg-row--privacy-block .bubble-wrap{ display:flex; flex-direction:column; gap:2px; }
.msg-row--privacy-block .bubble--privacy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  max-width:100%;
}
.msg-row--privacy-block .bubble-privacy-text{
  margin:0;
  line-height:1.5;
  word-wrap:break-word;
  white-space:normal;
}
.msg-row--privacy-block .bubble-privacy-text a{ color:var(--zik-link); text-decoration:underline; }
.msg-row--privacy-block .bubble-privacy-btn-wrap{ margin-top:2px; width:100%; max-width:260px; }
.msg-row--privacy-block .qr--privacy{ width:100%; max-width:260px; margin:0; padding:10px 16px; font-weight:600; background:var(--zik-accent1); color:#fff; border:none; border-radius:12px; cursor:pointer; font-size:.9rem; box-shadow:0 2px 8px rgba(46,207,154,.3); }
.msg-row--privacy-block .qr--privacy:hover{ filter:brightness(1.05); }
/* Come botflow: bubble 3 punti (stessi valori botflow) */
.typing-dots{ display:flex; gap:5px; align-items:center; padding:4px 2px; }
.typing-dots span{ width:7px; height:7px; background:var(--zik-muted); border-radius:50%; animation:td 1.1s ease-in-out infinite; }
.typing-dots span:nth-child(2){ animation-delay:.18s; }
.typing-dots span:nth-child(3){ animation-delay:.36s; }
.typing-bubble{ min-height:32px; min-width:52px; display:inline-flex; align-items:center; padding:0; }
.msg-row.bot .typing-bubble{ border-bottom-left-radius:5px; background:var(--zik-bubble); border:1px solid rgba(15,23,42,.08); box-shadow:0 1px 3px rgba(15,23,42,.06); }
@keyframes msgIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
@keyframes td{ 0%,80%,100%{ transform:translateY(0); background:var(--zik-muted); } 40%{ transform:translateY(-6px); background:var(--zik-accent1); } }
/* Cursore typewriter come botflow */
.typing-cursor::after{ content:'▌'; animation:blink .9s step-end infinite; color:var(--zik-accent1); margin-left:2px; }
@keyframes blink{ 50%{ opacity:0; } }
.zik-input-wrap{
  position:fixed;
  bottom:72px;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:480px;
  background:var(--zik-bg1);
  padding-bottom:env(safe-area-inset-bottom, 0);
  z-index:30;
  display:flex;
  flex-direction:column;
}
/* Quick reply nel flusso (come IAVOD): sotto l'ultimo messaggio, non barra fissa */
.qr-in-flow{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  padding:10px 0 6px;
  margin-top:8px;
  animation:fadeUp .3s ease;
  align-self:flex-start;
  max-width:100%;
  width:100%;
}
.qr-in-flow .qr{
  box-sizing:border-box;
  background:#fff;
  border:1.5px solid var(--zik-accent1);
  color: var(--zik-text);
  border-radius:16px;
  padding:12px 18px;
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  transition:all .18s;
  word-break:break-word;
  white-space:normal;
  line-height:1.3;
  min-height:48px;
  min-width:120px;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.qr-in-flow .qr:hover{ background:rgba(46,207,154,.12); color: var(--zik-text); border-color:var(--zik-accent1); transform:translateY(-1px); }
.zik-quick-replies{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  padding:6px 14px 8px;
  animation:msgIn .3s ease;
}
.zik-quick-replies .qr{
  box-sizing:border-box;
  background:#fff;
  border:1.5px solid var(--zik-accent1);
  color: var(--zik-text);
  border-radius:16px;
  padding:8px 14px;
  font-size:.8rem;
  font-weight:600;
  cursor:pointer;
  transition:all .18s;
  white-space:normal;
  word-break:break-word;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.3;
}
.zik-quick-replies .qr:hover{ background:rgba(46,207,154,.12); color: var(--zik-text); transform:translateY(-1px); }
.zik-input-bar{
  background:rgba(255,255,255,.95);
  border-radius:22px;
  margin:6px 14px 12px;
  padding:8px 10px 8px 14px;
  box-shadow:0 2px 16px rgba(0,0,0,.15);
  transition:box-shadow .2s;
}
/* Modalità flow: niente welcome iniziale, parte subito la prima domanda */
html[data-mode="flow"] #welcomeState{ display:none !important; }
/* Modalità flow: input nascosto fino a quando il flow non richiede inserimento (es. CAP) */
html[data-mode="flow"] .zik-input-bar.input-bar-hidden{ display:none !important; }
/* Enfasi input quando attivo (come botflow: colore ai bordi / box-shadow) */
.zik-input-bar:focus-within{ box-shadow:0 2px 20px rgba(46,207,154,.22); }
.zik-input-bar .input-row{
  display:flex;
  align-items:flex-end;
  gap:8px;
}
.zik-input-bar textarea{
  flex:1;
  border:none;
  outline:none;
  resize:none;
  font-size:.95rem;
  color:#222;
  background:transparent;
  max-height:110px;
  min-height:24px;
  line-height:1.5;
  padding:2px 0;
  font-family:inherit;
}
.zik-input-bar textarea::placeholder{ color:#999; }
.zik-send-btn{
  width:38px;
  height:38px;
  border-radius:50%;
  background:var(--zik-accent1);
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:var(--zik-bg1);
  font-size:1.1rem;
  font-weight:700;
  transition:background .18s, transform .15s;
}
.zik-send-btn:hover:not(:disabled){ filter:brightness(1.1); transform:scale(1.05); }
.zik-send-btn:disabled{ background:var(--zik-muted); cursor:default; opacity:.7; }
.lead-form-wrap .form-card{
  background:rgba(255,255,255,.95);
  border:1px solid rgba(255,255,255,.2);
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 2px 10px rgba(0,0,0,.1);
}
.lead-form-wrap input[type="tel"]{ width:100%; padding:12px 14px; border:1.5px solid #e0e0e0; border-radius:12px; font-size:1rem; margin-bottom:10px; box-sizing:border-box; }
.lead-form-wrap input[type="tel"]:focus{ border-color:var(--zik-accent1); outline:none; }
.lead-form-wrap .privacy-row{ display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; font-size:.85rem; color:var(--zik-text); }
.lead-form-wrap .privacy-row a{ color:var(--zik-link); text-decoration:underline; }
.lead-form-wrap .submit-lead{ width:100%; padding:12px; background:var(--zik-accent1); color:var(--zik-bg1); border:none; border-radius:12px; font-size:1rem; font-weight:700; cursor:pointer; }
.lead-form-wrap .submit-lead:disabled{ opacity:.6; cursor:not-allowed; }
.lead-form-wrap .form-error{ font-size:.8rem; color:#e11d48; margin-top:4px; }
.lead-form-wrap .form-success{ font-size:.9rem; color:var(--zik-accent1); margin-top:8px; }

#chat-box{
  width:100%;
  max-width:480px;
  height:60vh;
  margin:0 auto;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:5px;
  padding-bottom:90px;
  scrollbar-width:none;
}
#chat-box::-webkit-scrollbar{ display:none; }

/* Scroll FAB (vai in basso) — stile IAVOD */
.scroll-fab{
  position:fixed;
  bottom:calc(100px + env(safe-area-inset-bottom, 0px));
  right:max(16px, calc((100vw - 480px) / 2 + 16px));
  width:36px;
  height:36px;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 12px rgba(15,23,42,.12);
  cursor:pointer;
  transition:opacity .2s, transform .15s;
  opacity:0;
  pointer-events:none;
  z-index:20;
  font-size:1.1rem;
  color:var(--zik-accent1);
  line-height:1;
}
.scroll-fab:hover{ transform:scale(1.05); }
.scroll-fab.visible{ opacity:1; pointer-events:all; }

/* =========================
   MESSAGES
   ========================= */
.message-wrapper{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  width:100%;
  margin:5px 0;
  animation: fadeIn .35s ease-in-out;
}

.bot-avatar{
  width:50px;
  height:50px;
  margin-right:10px;
  flex-shrink:0;
  border-radius:50%;
  object-fit:contain;
  align-self:flex-end;
  transform: translateY(2px);
  transition: transform .3s ease;
}

/* Bot bubble */
.bot-message{
  background: var(--zik-bubble);
  color: var(--zik-text);
  padding:10px 15px;
  border-radius: var(--zik-radius);
  line-height:1.5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  max-width:90%;
  font-size:16px;
  animation: bubbleAppear .45s cubic-bezier(.25,.8,.25,1);
  transform-origin: bottom left;
  backface-visibility:hidden;
}
.bot-message strong{ font-weight:600; }
.bot-message emoji,
.bot-message span,
.bot-message img.emoji{
  vertical-align:middle;
  transform:scale(.95);
}

/* User bubble */
.user-message{
  align-self:flex-end;
  background: var(--zik-user);
  color: var(--zik-userText);
  font-weight:600;
  padding:10px 14px;
  border-radius:15px;
  max-width:80%;
  margin:6px 0 12px 0;
  animation: fadeIn .25s ease-in-out;
}

/* =========================
   INPUT (CAP / NUMERO)
   ========================= */
.input-container{
  background:#fff;
  color:#000;
  padding:15px 20px;
  border-radius:22px;
  line-height:1.4;
  box-shadow:0 2px 16px rgba(0,0,0,.09);
  max-width:85%;
  margin-left:50px;
  text-align:left;
  opacity:0;
  transform: translateY(10px);
  animation: fadeInUp .6s ease forwards;
  transition:box-shadow .2s;
}
.input-container:focus-within{
  box-shadow:0 2px 20px rgba(46,207,154,.25);
}

.input-container input{
  width:100%;
  border:1.5px solid #e0e0e0;
  border-radius:12px;
  padding:12px 14px;
  font-size:15px;
  margin-bottom:8px;
  box-sizing:border-box;
  outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.input-container input:focus{
  border-color: var(--zik-accent1);
  box-shadow:0 0 0 3px rgba(46,207,154,.2);
}

.input-container button{
  width:100%;
  background: linear-gradient(135deg, var(--zik-accent1), var(--zik-accent2));
  color:#07101f;
  border:none;
  border-radius:10px;
  padding:12px;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  transition: filter .2s ease, transform .08s ease;
}
.input-container button:hover{ filter: brightness(0.96); }
.input-container button:active{ transform: translateY(1px); }

/* Privacy */
.privacy-container{
  margin-top:8px;
  font-size:12px;
  color: var(--zik-muted);
  text-align:left;
}
.privacy-container a{
  color: var(--zik-link);
  text-decoration: underline;
  font-weight:500;
}

/* Numero container (specific) */
#numero-input-container{
  margin-left:50px;
  max-width:85%;
  text-align:left;
  width:100%;
  opacity:0;
  transform: translateY(10px);
  animation: fadeInUp .6s ease forwards;
}

/* =========================
   BUTTONS (choices)
   ========================= */
.button-container{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-auto-rows: 1fr;
  gap:12px;
  width:100%;
  max-width:600px;
  margin:5px 0;
}

.button-container button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #2ECF9A 0%, #4FA6FF 100%);
  
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.button-container button:hover{
  background: var(--zik-btnHover);
  border-color: var(--zik-btnHover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.20);
}
.button-container button small{
  display:block;
  font-size:13px;
  margin-top:3px;
  font-weight:400;
  color: rgba(255,255,255,.75);
}

/* =========================
   LEGAL MODAL (unchanged, minor color cleanup)
   ========================= */
.legal-row{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;margin:.5rem 0}
.legal-pill{border:0;padding:.25rem .6rem;border-radius:999px;font-size:.85rem;cursor:pointer;background:#f0bf4c}
.legal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:9998;opacity:0;transition:opacity .2s}
.legal-backdrop.show{opacity:1}
.legal-modal{position:fixed;left:0;right:0;bottom:0;max-height:75vh;background:#fff;border-radius:16px 16px 0 0;z-index:9999;transform:translateY(100%);transition:transform .25s ease;display:flex;flex-direction:column}
.legal-modal.show{transform:translateY(0)}
.legal-h{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #eee}
.legal-b{padding:12px 16px;overflow:auto;line-height:1.4;font-size:.95rem}
.legal-ack{display:flex;align-items:center;gap:.5rem;padding:8px 16px}
.legal-cta{margin:8px 16px 16px;padding:12px 14px;border:0;border-radius:10px;cursor:pointer;background:#f0bf4c}
.legal-cta[disabled]{opacity:.6;cursor:not-allowed}
.legal-close{background:transparent;border:0;font-size:1.1rem;cursor:pointer}
.legal-note{font-size:.6rem;color:var(--zik-muted);line-height:1.35}
.legal-note strong{font-weight:600;color:inherit}
.legal-link{
  background:none;border:0;padding:0;
  font:inherit;color:rgba(17,24,39,.55);
  text-decoration:underline;cursor:pointer;
  font-size:.6rem;
}
.legal-link:hover{text-decoration:none}
.legal-link:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:2px}

/* =========================
   AI WELCOME MODAL (kept)
   ========================= */
.aiw-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  z-index:10050;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.aiw-modal{
  width:min(560px,92vw);
  background:#fff;
  border-radius:14px;
  box-shadow:0 18px 55px rgba(0,0,0,.25);
  overflow:hidden;
  font-family:inherit;
}
.aiw-head{display:flex;align-items:center;gap:10px;padding:16px 18px 10px}
.aiw-badge{
  width:28px;height:28px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.06);flex:0 0 auto;
}
.aiw-title{margin:0;font-size:16px;font-weight:800}
.aiw-body{padding:0 18px 14px;font-size:13px;line-height:1.35;color:#222}
.aiw-body p{margin:10px 0}
.aiw-body a{color:var(--zik-link);text-decoration:underline}
.aiw-actions{padding:14px 18px 18px;display:flex;justify-content:flex-start;gap:10px}
.aiw-btn{border:0;cursor:pointer;padding:10px 14px;border-radius:10px;font-weight:800}
.aiw-btn-primary{background:#ffcc00;color:#111}
.aiw-btn-primary:active{transform: translateY(1px)}

/* =========================
   FOOTER (kept)
   ========================= */
#footer{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  width:100%;
  background:#fff;
  padding:5px;
  padding-bottom:calc(5px + env(safe-area-inset-bottom, 0px));
  text-align:center;
  font-size:10px;
  box-shadow:0 -2px 5px rgba(0,0,0,0.10);
}
#footer a{
  color: var(--zik-link);
  text-decoration: none;
}
#footer a:hover{ text-decoration: underline; }
#footer{ color: var(--zik-muted); }

/* =========================
   ERRORS
   ========================= */
.error-message{
  display:block;
  font-weight:500;
  margin-top:6px;
  margin-bottom:8px;
  text-align:left;
  padding-left:4px;
  transition: all .2s ease-in-out;
  color: #e11d48; /* rose/red (softer) */
  font-size:12px;
}
input.error{
  border: 1.5px solid #e11d48 !important;
  box-shadow: 0 0 6px rgba(225,29,72,.18);
}

/* =========================
   OFFERTA (kept)
   ========================= */
.offer-message{
  background:none !important;
  box-shadow:none !important;
  border:none !important;
  border-radius:0 !important;
  padding:0 !important;
  margin:12px 0 !important;
  color:#000;
  font-size:15px;
  line-height:1.45;
}
.offer-message strong{color:#000;font-weight:600}
.offer-message s{color:#999}

/* =========================
   ASSIST (kept)
   ========================= */
#assist-slot{ margin:12px 14px 6px; }
.assist{
  border:1px solid #e5e5e5;
  border-radius:14px;
  padding:10px;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.assist.hidden{display:none}
.assist-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.assist-title{font-weight:700;font-size:14px;color:#111}
#assistClose{border:0;background:transparent;font-size:18px;cursor:pointer;line-height:1;padding:4px 6px}
.assist-body{max-height:190px;overflow:auto;padding:8px;background:#fafafa;border-radius:12px}
.assist-foot{display:flex;gap:8px;margin-top:8px}
.assist-foot input{flex:1;padding:10px;border-radius:12px;border:1px solid #ddd;outline:none}
.assist-foot button{padding:10px 12px;border-radius:12px;border:0;cursor:pointer}
.assist-msg{margin:8px 0;font-size:14px;line-height:1.25}
.assist-msg.bot{color:#111}
.assist-msg.user{text-align:right;color:#222}
.assist-meta{font-size:12px;opacity:.7;margin-top:4px}

.assist-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index:9998;
}
.assist-backdrop.hidden{display:none}

#assistChat.assist{
  position:fixed; left:12px; right:12px; bottom:12px;
  z-index:9999;
  max-height:62vh;
  display:flex; flex-direction:column;
  border-radius:18px;
  border:1px solid #eee;
  box-shadow:0 16px 40px rgba(0,0,0,.22);
}
#assistChat.hidden{display:none}
#assistChat .assist-head{padding:12px 12px 8px;border-bottom:1px solid #eee}
#assistChat .assist-body{
  padding:10px 12px; overflow:auto;
  max-height:44vh;
  background:#fafafa;
  border-radius:14px;
  margin:10px 12px;
}
#assistChat .assist-foot{
  padding:10px 12px 12px;
  display:flex; gap:8px;
  border-top:1px solid #eee;
  background:#fff;
  border-bottom-left-radius:18px;
  border-bottom-right-radius:18px;
}

/* =========================
   AI CHATBAR (colors updated)
   ========================= */
.ai-dock-wrap{ width:100%; box-sizing:border-box; }
.ai-chatbar{
  display:flex; align-items:center; gap:6px;
  width:100%;
  background:#fff;
  border-radius:18px;
  padding:8px;
  border:1px solid rgba(0,0,0,.12);
  box-shadow:0 8px 20px rgba(0,0,0,.10);
}
.ai-chatbar input{
  flex:1 1 auto;
  min-width:0;
  border:1px solid rgba(0,0,0,.15);
  border-radius:14px;
  padding:14px 14px;
  font-size:16px;
  outline:none;
  width:100%;
  box-sizing:border-box;
}
.ai-chatbar .ai-send{
  flex:0 0 auto;
  white-space:nowrap;
  border:0;
  border-radius:14px;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
  background: linear-gradient(135deg, var(--zik-accent1), var(--zik-accent2));
  color:#07101f;
  min-height:48px;
  transition: filter .2s;
}
.ai-chatbar .ai-send:hover{ filter: brightness(.96); }

.ai-chatbar .ai-continue{
  display:none;
  flex:1 1 100%;
  justify-content:center;
  align-items:center;
  border-radius:16px;
  background: var(--zik-btn);
  color:#fff;
  font-weight:900;
  padding:16px 20px;
  font-size:17px;
  cursor:pointer;
  border:2px solid var(--zik-btn);
  text-align:center;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  transition: background .2s, transform .1s;
}
.ai-chatbar .ai-continue:hover{ background: var(--zik-btnHover); }
.ai-chatbar .ai-continue:active{ transform: translateY(1px); }

.ai-chatbar .ai-continue[style*="display:inline"],
.ai-chatbar .ai-continue[style*="display: inline-block"],
.ai-chatbar .ai-continue[style*="display:block"]{
  display:flex !important; width:100%;
}

.ai-err{ margin-top:8px; padding-left:4px; }

/* =========================
   ANIMATIONS (kept)
   ========================= */
@keyframes fadeIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}
@keyframes fadeInUp{
  0%{ opacity:0; transform: translateY(10px); }
  100%{ opacity:1; transform: translateY(0); }
}
@keyframes bubbleAppear{
  0%{ transform: scale(.3) translateY(15px); opacity:0; }
  50%{ transform: scale(.8) translateY(5px); opacity:.7; }
  80%{ transform: scale(1.05); opacity:1; }
  100%{ transform: scale(1); opacity:1; }
}

/* typing bubble */
.bot-message.loading{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:28px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
  animation: bubbleAppear .4s ease-out;
  transition: all .6s ease;
  border-radius:25px 25px 25px 0px;
}
.bot-message.expanded{
  width:auto;
  height:auto;
  padding:12px 18px;
  border-radius:26px;
  transition: all .6s ease-in-out;
}

/* dots */
.typing-indicator{ display:flex; align-items:center; justify-content:center; gap:6px; height:14px; }
.typing-indicator span{
  width:9px; height:9px; border-radius:50%;
  background-color:#000;
  opacity:.25;
  transform: scale(.7);
  animation: waveTyping 1.8s infinite ease-in-out;
}
.typing-indicator span:nth-child(1){ animation-delay:0s; }
.typing-indicator span:nth-child(2){ animation-delay:.2s; }
.typing-indicator span:nth-child(3){ animation-delay:.4s; }

@keyframes waveTyping{
  0%,80%,100%{ transform: translateY(0px) scale(.7); opacity:.25; }
  40%{ transform: translateY(-6px) scale(1); opacity:.9; }
}

/* text soft */
.bot-message.expanded p,
.bot-message.expanded span,
.bot-message.expanded strong{
  animation: fadeInTextSoft .5s ease forwards;
}
@keyframes fadeInTextSoft{
  0%{ opacity:0; transform: translateY(2px); }
  100%{ opacity:1; transform: translateY(0); }
}

/* repaint safety */
.animated{
  -webkit-transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* responsive tweaks kept */
@media (max-width:768px){
  #chat-box{ max-width:100%; padding:5px; }
}
@media (min-width:768px){
  .bot-message{ font-size:17px; line-height:1.5; padding:15px 20px; }
}
@media (max-width:480px){
  .ai-chatbar{ gap:5px; padding:8px; }
  .ai-chatbar input{ padding:13px 12px; }
  .ai-chatbar .ai-send{ padding:12px 14px; }
}
@media (max-width:768px){
  #footer{
    position:fixed;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    width:100%;
    text-align:center;
    background:#fff;
    padding:11px;
    font-size:10px;
    color:#193755;
    box-sizing:border-box;
  }
}
.legal-note{
  font-size:12px;
  color:rgba(15,23,42,.6);
  margin-top:8px;
  margin-bottom:6px;
  line-height:1.4;
}

