
.lp-ai-root{
  --lp-ai-safe-top:96px;
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999999;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

/* Clear, recognizable launcher */
.lp-ai-launcher{
  min-width:118px;
  height:44px;
  padding:0 14px 0 9px;
  border:1px solid #d9e0e8;
  border-radius:999px;
  background:#fff;
  color:#0b2f63;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow:0 10px 28px rgba(15,23,42,.16);
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.lp-ai-launcher:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(15,23,42,.20);
  background:#f8fafc;
}
.lp-ai-launcher-icon{
  width:26px;
  height:26px;
  min-width:26px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#0b2f63;
  color:#fff;
  font-size:12px;
  line-height:1;
}
.lp-ai-launcher-text{
  display:inline!important;
  font-size:12.5px;
  line-height:1;
  font-weight:800;
  letter-spacing:-.1px;
  white-space:nowrap;
}

/* Tall panel that always starts below the visible site/admin header */
.lp-ai-panel{
  position:fixed;
  right:18px;
  top:var(--lp-ai-safe-top);
  bottom:74px;
  width:min(370px,calc(100vw - 24px));
  height:auto;
  min-height:420px;
  max-height:none;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 20px 55px rgba(15,23,42,.20);
  display:grid;
  grid-template-rows:58px 1fr auto 26px;
}
.lp-ai-panel[hidden]{display:none!important}

.lp-ai-header{
  min-height:58px;
  background:#fff;
  color:#111827;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #eceff3;
}
.lp-ai-header strong{
  display:block;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:-.1px;
}
.lp-ai-header span{
  display:block;
  margin-top:2px;
  font-size:10px;
  line-height:1.2;
  color:#6b7280;
  font-weight:500;
}
#lp-ai-close{
  width:32px;
  height:32px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#6b7280;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  display:grid;
  place-items:center;
}
#lp-ai-close:hover{background:#f3f4f6;color:#111827}

.lp-ai-messages{
  min-height:0;
  overflow-y:auto;
  padding:16px 14px 12px;
  background:#fff;
  scroll-behavior:smooth;
}
.lp-ai-message{
  max-width:88%;
  padding:10px 12px;
  border-radius:14px;
  margin:0 0 10px;
  font-size:12.5px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
  box-sizing:border-box;
}
.lp-ai-bot{
  background:#f3f4f6;
  color:#111827;
  border:0;
  border-bottom-left-radius:5px;
}
.lp-ai-user{
  background:#0b2f63;
  color:#fff;
  margin-left:auto;
  border-bottom-right-radius:5px;
}
.lp-ai-typing{color:#6b7280;font-style:normal;opacity:.8}

.lp-ai-form{
  padding:10px;
  background:#fff;
  border-top:1px solid #eceff3;
  display:grid;
  grid-template-columns:1fr 38px;
  gap:8px;
  align-items:end;
}
.lp-ai-form textarea{
  width:100%;
  min-width:0;
  min-height:40px;
  max-height:110px;
  resize:none;
  border:1px solid #d1d5db!important;
  border-radius:12px!important;
  padding:10px 11px!important;
  font:inherit!important;
  font-size:12.5px!important;
  line-height:1.35!important;
  font-weight:400!important;
  box-shadow:none!important;
  outline:none!important;
  background:#fff!important;
  color:#111827!important;
  box-sizing:border-box!important;
}
.lp-ai-form textarea::placeholder{color:#9ca3af}
.lp-ai-form textarea:focus{
  border-color:#94a3b8!important;
  box-shadow:0 0 0 2px rgba(148,163,184,.12)!important;
}
#lp-ai-send{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  padding:0;
  border:0;
  border-radius:10px;
  background:#0b2f63;
  color:#fff;
  font-size:0;
  font-weight:700;
  cursor:pointer;
  display:grid;
  place-items:center;
  position:relative;
}
#lp-ai-send::before{
  content:"↑";
  font-size:18px;
  line-height:1;
  font-weight:800;
}
#lp-ai-send:hover{background:#08264f}
#lp-ai-send:disabled{opacity:.45;cursor:wait}

.lp-ai-note{
  min-height:26px;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#9ca3af;
  font-size:9px;
  line-height:1.2;
  text-align:center;
  border-top:1px solid #f3f4f6;
}

@media(max-width:600px){
  .lp-ai-root{right:12px;bottom:12px}
  .lp-ai-launcher{
    min-width:108px;
    height:42px;
    padding:0 12px 0 8px;
  }
  .lp-ai-launcher-icon{
    width:24px;height:24px;min-width:24px;
  }
  .lp-ai-launcher-text{font-size:12px}
  .lp-ai-panel{
    left:10px;
    right:10px;
    top:var(--lp-ai-safe-top);
    bottom:64px;
    width:auto;
    min-height:360px;
    border-radius:14px;
  }
  .lp-ai-header{min-height:54px}
  .lp-ai-messages{padding:14px 12px 10px}
  .lp-ai-message{
    max-width:90%;
    font-size:12px;
    padding:9px 11px;
  }
}
