/* ---------- LCM CHATBOT WIDGET ---------- */
.lcm-chat-toggle{
  position:fixed;right:24px;bottom:24px;z-index:9999;
  width:60px;height:60px;border-radius:50%;border:none;cursor:pointer;
  background:var(--yellow);color:var(--ink);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 26px rgba(0,0,0,0.28);
  transition:transform .2s ease, box-shadow .2s ease;
}
.lcm-chat-toggle:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(0,0,0,0.34);}
.lcm-chat-toggle svg{width:26px;height:26px;}
.lcm-chat-toggle .lcm-icon-close{display:none;}
.lcm-chat-toggle[aria-expanded="true"] .lcm-icon-chat{display:none;}
.lcm-chat-toggle[aria-expanded="true"] .lcm-icon-close{display:block;}

.lcm-chat-badge{
  position:absolute;top:-4px;right:-4px;
  width:20px;height:20px;border-radius:50%;
  background:var(--red);color:var(--white);
  font-size:11px;font-weight:700;font-family:var(--font-body);
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--paper);
}

.lcm-chat-teaser{
  position:fixed;right:24px;bottom:96px;z-index:9998;
  max-width:230px;background:var(--white);color:var(--ink);
  padding:14px 16px;border-radius:18px 18px 5px 18px;
  font-size:13.5px;line-height:1.4;box-shadow:0 12px 28px rgba(0,0,0,0.22);
  animation:lcmRise .4s ease both;
}
.lcm-chat-teaser button{
  position:absolute;top:6px;right:8px;border:none;background:none;
  color:var(--steel-light);font-size:15px;line-height:1;cursor:pointer;padding:4px;
}
@keyframes lcmRise{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}

.lcm-chat-panel{
  position:fixed;right:24px;bottom:96px;z-index:9999;
  width:370px;max-width:calc(100vw - 32px);
  height:min(560px, calc(100vh - 130px));
  background:var(--paper);border-radius:22px;overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 26px 64px rgba(0,0,0,0.38);
  font-family:var(--font-body);
}
.lcm-chat-panel[hidden]{display:none;}

.lcm-chat-head{
  background:var(--charcoal);color:var(--white);
  padding:16px 18px;display:flex;align-items:center;gap:12px;flex-shrink:0;
}
.lcm-chat-head .lcm-avatar{
  width:38px;height:38px;border-radius:12px;flex-shrink:0;
  background:var(--ink);display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(240,174,4,0.35);
}
.lcm-chat-head .lcm-avatar svg{width:20px;height:20px;}
.lcm-chat-head .lcm-head-text{flex:1;min-width:0;}
.lcm-chat-head strong{display:block;font-size:15px;font-weight:700;}
.lcm-chat-head .lcm-status{display:block;font-size:12px;color:var(--concrete-dark);margin-top:2px;}
.lcm-chat-head .lcm-status::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#3FBF63;margin-right:5px;}
.lcm-chat-close{background:none;border:none;color:var(--concrete);cursor:pointer;padding:6px;flex-shrink:0;}
.lcm-chat-close svg{width:18px;height:18px;}

.lcm-chat-body{
  flex:1;overflow-y:auto;padding:16px;background:var(--concrete);
  display:flex;flex-direction:column;gap:10px;
}
.lcm-msg{max-width:86%;font-size:13.5px;line-height:1.5;}
.lcm-msg-bot{
  align-self:flex-start;background:var(--white);color:var(--ink);
  padding:10px 14px;border-radius:16px 16px 16px 4px;
  box-shadow:0 1px 3px rgba(0,0,0,0.08);
}
.lcm-msg-bot p{margin:0 0 6px;}
.lcm-msg-bot p:last-child{margin-bottom:0;}
.lcm-msg-bot ul{margin:6px 0 0;padding-left:18px;}
.lcm-msg-bot li{margin-bottom:4px;}
.lcm-msg-user{
  align-self:flex-end;background:var(--ink);color:var(--white);
  padding:10px 14px;border-radius:16px 16px 4px 16px;
}
.lcm-chips{align-self:flex-start;display:flex;flex-wrap:wrap;gap:8px;max-width:100%;}
.lcm-chip{
  background:var(--white);border:1px solid var(--line);color:var(--ink);
  padding:8px 14px;border-radius:20px;font-size:12.5px;font-weight:600;
  cursor:pointer;transition:background .15s ease, border-color .15s ease, transform .15s ease;
  font-family:var(--font-body);
}
.lcm-chip:hover{background:var(--yellow);border-color:var(--yellow);transform:translateY(-1px);}

.lcm-lead-card{
  align-self:stretch;background:var(--white);border-radius:18px;
  padding:16px;box-shadow:0 1px 3px rgba(0,0,0,0.08);
  display:flex;flex-direction:column;gap:10px;
}
.lcm-lead-card h4{margin:0;font-size:14px;font-family:var(--font-head);}
.lcm-field label{display:block;font-size:12px;font-weight:600;color:var(--steel-light);margin-bottom:4px;}
.lcm-field input,.lcm-field select,.lcm-field textarea{
  width:100%;font-family:var(--font-body);font-size:13.5px;
  border:1px solid var(--line);border-radius:12px;padding:9px 12px;color:var(--ink);
  background:var(--paper);
}
.lcm-field textarea{resize:vertical;min-height:56px;}
.lcm-field input:focus,.lcm-field select:focus,.lcm-field textarea:focus{outline:2px solid var(--yellow);outline-offset:1px;}
.lcm-lead-submit{
  border:none;background:var(--yellow);color:var(--ink);font-weight:700;font-size:13.5px;
  padding:11px 14px;border-radius:30px;cursor:pointer;font-family:var(--font-body);
  transition:background .15s ease, transform .15s ease;
}
.lcm-lead-submit:hover{background:var(--yellow-dark);transform:translateY(-1px);}
.lcm-lead-submit:disabled{opacity:.6;cursor:default;}
.lcm-lead-note{font-size:11px;color:var(--steel-light);margin:0;}
.lcm-field-error{color:var(--red);font-size:11.5px;margin-top:3px;display:none;}
.lcm-field.lcm-invalid input,.lcm-field.lcm-invalid select{border-color:var(--red);}
.lcm-field.lcm-invalid .lcm-field-error{display:block;}

.lcm-typing{align-self:flex-start;display:flex;gap:4px;background:var(--white);padding:12px 14px;border-radius:14px 14px 14px 3px;box-shadow:0 1px 3px rgba(0,0,0,0.08);}
.lcm-typing span{width:6px;height:6px;border-radius:50%;background:var(--steel-light);opacity:.5;animation:lcmBounce 1s infinite ease-in-out;}
.lcm-typing span:nth-child(2){animation-delay:.15s;}
.lcm-typing span:nth-child(3){animation-delay:.3s;}
@keyframes lcmBounce{0%,80%,100%{transform:translateY(0);opacity:.5;}40%{transform:translateY(-4px);opacity:1;}}

.lcm-chat-input{
  flex-shrink:0;display:flex;gap:8px;padding:12px;background:var(--paper);
  border-top:1px solid var(--line);
}
.lcm-chat-input input{
  flex:1;border:1px solid var(--line);border-radius:20px;padding:10px 16px;
  font-size:13.5px;font-family:var(--font-body);color:var(--ink);background:var(--white);
}
.lcm-chat-input input:focus{outline:2px solid var(--yellow);outline-offset:1px;}
.lcm-chat-send{
  width:40px;height:40px;border-radius:50%;border:none;background:var(--ink);color:var(--white);
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  transition:background .15s ease;
}
.lcm-chat-send:hover{background:var(--charcoal);}
.lcm-chat-send svg{width:16px;height:16px;}

@media (max-width:480px){
  .lcm-chat-panel{right:10px;left:10px;width:auto;bottom:86px;height:min(560px, calc(100vh - 118px));}
  .lcm-chat-toggle{right:16px;bottom:16px;}
  .lcm-chat-teaser{right:16px;left:16px;max-width:none;bottom:86px;}
}
