/* Base widget styling */
.lena-chatbot-root{position:fixed;right:18px;bottom:18px;z-index:2147483000;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.lcb-bubble{background:#111;color:#fff;width:56px;height:56px;border-radius:999px;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 24px rgba(0,0,0,.25);cursor:pointer}
.lcb-badge{font-size:13px;font-weight:600}
.lcb-panel{position:fixed;right:18px;bottom:86px;width:340px;max-width:92vw;max-height:70vh;background:#fff;color:#111;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.25);display:none;flex-direction:column;overflow:hidden}
.lcb-panel.open{display:flex}
.lcb-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#111;color:#fff}
.lcb-title{font-weight:700}
.lcb-x{background:transparent;color:#fff;border:0;font-size:22px;cursor:pointer}

/* Chat message area */
.lcb-body{
    flex:1;
    overflow-y:scroll;          /* always show a scrollbar */
    padding:10px 12px;
    background:#f7f7f8;
    overscroll-behavior-y:contain;
    overscroll-behavior-x:contain;
    touch-action:pan-y;
    -ms-touch-action:pan-y;
    scrollbar-width:thin;       /* Firefox */
}
.lcb-body::-webkit-scrollbar{
    width:6px;                  /* Chrome/Safari/Edge */
}
.lcb-body::-webkit-scrollbar-thumb{
    background:#ccc;
    border-radius:3px;
}

/* Other styles */
.m{margin:8px 0;display:flex;flex-direction:column}
.m .b{display:inline-block;padding:8px 10px;border-radius:12px;max-width:85%;line-height:1.3}
.m.me .b{background:#e6f0ff;align-self:flex-end}
.m.bot .b{background:#fff;border:1px solid #e8e8ea}
.m .t{font-size:11px;color:#666;margin-top:2px}
.lcb-quick{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;background:#fff;border-top:1px solid #eee}
.lcb-quick .chip{background:#f1f1f4;border:1px solid #e6e6ea;border-radius:999px;padding:6px 10px;font-size:13px;cursor:pointer}
.lcb-form{display:flex;gap:6px;padding:8px 12px;border-top:1px solid #eee;background:#fff}
.lcb-form input{flex:1;padding:8px 10px;border-radius:10px;border:1px solid #ddd}
.lcb-send{background:#111;color:#fff;border:0;padding:8px 12px;border-radius:10px;cursor:pointer}

/* Mini-form (contact form) */
.lcb-mini{
    display:grid;
    grid-template-columns:1fr;  /* single column everywhere */
    gap:6px;
    width:100%;                /* fill the chat width */
    max-width:none;            /* remove cap */
    margin:0;                  /* remove centering */
}
.lcb-mini .mini{
    padding:8px 12px;          /* more generous padding */
    border:1px solid #ddd;
    border-radius:8px;
    font-size:13px;
}
.lcb-mini .mini-send{
    grid-column:1/-1;
    padding:8px 10px;
    background:#111;
    color:#fff;
    border:0;
    border-radius:10px;
    cursor:pointer;
}

/* Mobile adjustments (near full-screen chat) */
@media (max-width:480px) {
  .lcb-panel.open {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    /* Use dynamic viewport units and allow scrolling if needed */
    height: 100svh;         /* 100svh accounts for iOS safe areas */
    max-height: none;
    max-width: none;
    border-radius: 0;
    overflow-y: auto;       /* let the panel scroll internally if it gets longer */
  }

  .lcb-body {
    /* On small screens, give the message area a max-height and allow scrolling */
    max-height: calc(100svh - 150px); /* adjust 150px based on your header/footer/input height */
    overflow-y: auto;
  }

  .lcb-mini {
    max-height: 40vh;       /* cap the mini‑form’s height so it doesn’t fill the panel */
    overflow-y: auto;
  }
}
