/* ============================================================
   LIVE CHAT (pengunjung) — widget melayang
   ============================================================ */

.lc-launcher{
  position:fixed;right:18px;bottom:166px;z-index:86;
  width:58px;height:58px;border-radius:50%;display:grid;place-items:center;
  color:#fff;background:linear-gradient(140deg,#4f7ee7,#2f5fd0);
  border:none;cursor:pointer;padding:0;
  box-shadow:0 14px 32px -8px rgba(47,95,208,.6);
  transition:transform .25s ease;
}
.lc-launcher:hover{transform:scale(1.08)}
.lc-badge{
  position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:999px;
  background:#ff4757;color:#fff;font-size:.7rem;font-weight:900;display:none;
  place-items:center;padding:0 5px;border:2px solid #fff;
}
.lc-badge.on{display:grid}
body.lc-open .lc-launcher{transform:scale(.92)}

.lc-panel{
  position:fixed;right:14px;bottom:14px;z-index:96;
  width:min(380px,calc(100vw - 24px));height:min(600px,calc(100dvh - 24px));
  display:none;flex-direction:column;overflow:hidden;
  background:#fff;border:1px solid rgba(20,40,95,.14);border-radius:22px;
  box-shadow:0 40px 100px -22px rgba(23,43,100,.5);
}
body.lc-open .lc-panel{display:flex}
.lc-head{
  flex:none;display:flex;align-items:center;gap:.7rem;padding:.85rem 1rem;
  background:linear-gradient(120deg,#0a1d4e,#17457f 60%,#0b5c46 130%);
}
.lc-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:1.3rem;background:linear-gradient(140deg,#5f9dff,#2f5fd0);flex:none}
.lc-head-txt{flex:1;min-width:0}
.lc-head-txt strong{display:block;color:#fff;font-size:.95rem;font-weight:800;line-height:1.25}
.lc-head-txt small{display:flex;align-items:center;gap:.35rem;color:#9ee8cf;font-size:.7rem}
.lc-head-txt small i{width:7px;height:7px;border-radius:50%;background:#9aa6c2;box-shadow:0 0 0 3px rgba(154,166,194,.2)}
.lc-head-txt small i.on{background:#2bd56e;box-shadow:0 0 0 3px rgba(43,213,110,.25);animation:lcBlink 2s infinite}
@keyframes lcBlink{0%,100%{opacity:1}50%{opacity:.45}}
.lc-close{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.12);color:#c6d2ea;border:none;cursor:pointer;font-size:.9rem}
.lc-close:hover{background:rgba(255,255,255,.24);color:#fff}

.lc-body{flex:1;overflow-y:auto;padding:1rem .9rem;display:flex;flex-direction:column;gap:.6rem;background:linear-gradient(180deg,#f6f9ff,#eef4ff)}
.lc-msg{display:flex;max-width:88%}
.lc-msg.visitor{align-self:flex-end}
.lc-msg.admin{align-self:flex-start}
.lc-bubble{
  font-size:.9rem;line-height:1.55;padding:.62rem .85rem;border-radius:16px;
  white-space:pre-wrap;word-wrap:break-word;animation:lcIn .3s cubic-bezier(.16,1,.3,1);
}
@keyframes lcIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.lc-msg.visitor .lc-bubble{background:linear-gradient(135deg,#4f7ee7,#2f5fd0);color:#fff;border-radius:16px 16px 4px 16px}
.lc-msg.admin .lc-bubble{background:#fff;color:#22314f;border:1px solid rgba(20,40,95,.12);border-radius:16px 16px 16px 4px;box-shadow:0 8px 20px -12px rgba(23,43,100,.35)}
.lc-meta{font-size:.66rem;color:var(--muted-2);margin-top:.2rem;text-align:right}
.lc-msg.admin .lc-meta{text-align:left}
.lc-note{text-align:center;font-size:.78rem;color:var(--muted-2);background:rgba(255,255,255,.7);border:1px dashed rgba(20,40,95,.18);border-radius:12px;padding:.5rem .7rem}

.lc-form{flex:none;display:flex;gap:.5rem;padding:.7rem .8rem .85rem;border-top:1px solid rgba(20,40,95,.08);background:#fff}
.lc-form textarea{
  flex:1;min-width:0;font:inherit;font-size:.9rem;color:#22314f;resize:none;
  background:#f2f6fd;border:1px solid rgba(20,40,95,.14);border-radius:14px;padding:.6rem .85rem;outline:none;
  max-height:110px;
}
.lc-form textarea:focus{border-color:rgba(79,126,231,.6);background:#fff}
.lc-form button{
  flex:none;width:44px;height:44px;border-radius:50%;border:none;cursor:pointer;display:grid;place-items:center;
  color:#fff;background:linear-gradient(135deg,#4f7ee7,#2f5fd0);
}
.lc-form button:hover{filter:brightness(1.08)}
.lc-form button:disabled{opacity:.5;cursor:not-allowed}

/* form perkenalan */
.lc-intro{display:flex;flex-direction:column;gap:.7rem;background:#fff;border:1px solid rgba(20,40,95,.12);border-radius:16px;padding:1rem}
.lc-intro h4{margin:0;font-size:.98rem;font-weight:800;color:var(--navy-900)}
.lc-intro p{margin:0;font-size:.85rem;color:var(--muted)}
.lc-intro input{
  font:inherit;font-size:.9rem;color:#22314f;background:#f6f9ff;border:1px solid rgba(20,40,95,.16);
  border-radius:11px;padding:.62rem .8rem;outline:none;width:100%;
}
.lc-intro button{
  font:inherit;font-weight:800;font-size:.9rem;color:#fff;cursor:pointer;border:none;border-radius:11px;
  padding:.7rem 1rem;background:linear-gradient(135deg,#4f7ee7,#2f5fd0);
}
.lc-err{color:#b02a19;font-size:.82rem;font-weight:700}

@media (max-width:480px){
  .lc-launcher{width:52px;height:52px;bottom:236px}
  .lc-panel{right:10px;bottom:10px;width:calc(100vw - 20px);height:calc(100dvh - 20px);border-radius:20px}
}
