/* Lanos gift-inquiry chat bubble (lanos-chat-bubble.js), bottom-right on every
   lanosgift.vn page. Colours follow the shared Lanos palette (--lg-* in the
   child theme's style.css) with literal fallbacks, so the bubble looks right
   even before or without that block. Everything is prefixed .lnc- so Bricks
   and WooCommerce styles cannot reach in, and nothing here touches the page. */
/* The site's call / Zalo / Messenger column (.pv-contact-box, 46px wide, 15px from
   the right, 70px from the bottom, z 99999) sits right above: the launcher is
   centred under it, and the open panel stacks over it. On phones the theme's
   bottom bar (z 999999) replaces that column; the script sets --lnc-lift to its
   height so the bubble sits just above it. */
.lnc-wrap { position: fixed; right: calc(14px + var(--lnc-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + var(--lnc-lift, 0px) + 12px); z-index: 1000000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none;
  font-family: var(--lg-font-than, "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif); color: var(--lg-chu, #2b1a12); }
.lnc-wrap > * { pointer-events: auto; }
.lnc-wrap *, .lnc-wrap *::before, .lnc-wrap *::after { box-sizing: border-box; }
/* Launcher: 72px on phones (1.5x the old 48px), 96px on desktop (2x), where it sits half-way down the right edge.
   It can be dragged anywhere; the script then pins the wrap with inline left/right/top/bottom (.lnc-moved). */
.lnc-launcher { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--lg-dong-sang, #f4dcab); cursor: grab; touch-action: none;
  background: var(--lg-anh-kim-nut, linear-gradient(135deg, #f4dcab 0%, #e3ba78 45%, #c49353 100%)); color: var(--lg-chu, #2b1a12);
  display: grid; place-items: center; box-shadow: var(--lg-bong-nut, 0 4px 12px rgba(145, 90, 32, .30)); padding: 0; margin: 0; }
.lnc-launcher svg { width: 39px; height: 39px; }
.lnc-launcher:hover { transform: translateY(-1px); }
.lnc-wrap.lnc-dragging .lnc-launcher { cursor: grabbing; transform: scale(1.05); }
.lnc-wrap.lnc-below { flex-direction: column-reverse; }
.lnc-wrap.lnc-left { align-items: flex-start; }
@media (min-width: 768px) {
  .lnc-wrap:not(.lnc-moved) { bottom: calc(50vh - 48px); }
  .lnc-launcher { width: 96px; height: 96px; border-width: 3px; }
  .lnc-launcher svg { width: 50px; height: 50px; }
}
.lnc-launcher.open { background: var(--lg-dong-toi, #915a20); color: #fff; }
/* Height leaves room for the launcher, the gap and any bottom bar under it (--lnc-lift). */
.lnc-panel { width: min(370px, calc(var(--lnc-vw, 100vw) - 28px)); max-height: min(580px, var(--lnc-room, calc(100dvh - var(--lnc-lift, 0px) - 120px))); display: flex; flex-direction: column;
  background: var(--lg-nen, #fffaf2); border: 1px solid var(--lg-vien, rgba(145, 90, 32, .28)); border-radius: 16px;
  box-shadow: var(--lg-bong-vua, 0 8px 22px rgba(101, 57, 16, .16)); overflow: hidden; }
.lnc-panel { transform: translateX(var(--lnc-shift, 0px)); }
.lnc-panel[hidden] { display: none; }
.lnc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 10px;
  background: var(--lg-anh-kim, linear-gradient(135deg, #f4dcab 0%, #e3ba78 22%, #c49353 48%, #a97437 72%, #915a20 100%)); color: #fff; }
.lnc-head b { display: block; font-size: 16px; font-family: var(--lg-font-tieu-de, "Playfair Display", Georgia, serif); text-shadow: 0 1px 2px rgba(101, 57, 16, .45); }
.lnc-head small { display: block; font-size: 12px; margin-top: 2px; text-shadow: 0 1px 2px rgba(101, 57, 16, .45); }
.lnc-x { border: 0; background: none; font-size: 16px; color: #fff; cursor: pointer; padding: 2px 4px; line-height: 1; }
.lnc-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.lnc-msg { max-width: 85%; padding: 8px 11px; border-radius: 12px 12px 12px 4px; background: var(--lg-nen-kem, #fdf3dc);
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; }
.lnc-msg.mine { align-self: flex-end; background: var(--lg-dong-toi, #915a20); color: #fff; border-radius: 12px 12px 4px 12px; }
.lnc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lnc-chips button { border: 1px solid var(--lg-dong, #c49353); background: #fff; color: var(--lg-dong-bong, #653910); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.2; font-family: inherit; }
.lnc-chips button:hover { background: var(--lg-nen-kem, #fdf3dc); }
.lnc-contact { background: #fff; border: 1px solid var(--lg-vien, rgba(145, 90, 32, .28)); border-radius: 10px; padding: 10px; font-size: 13px;
  display: flex; flex-direction: column; gap: 6px; }
.lnc-contact p { margin: 0 0 2px; }
.lnc-contact input, .lnc-compose textarea { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--lg-vien, rgba(145, 90, 32, .28));
  border-radius: 8px; font: inherit; font-size: 14px; color: inherit; background: #fff; margin: 0; }
.lnc-contact button, .lnc-send { border: 0; background: var(--lg-anh-kim-nut, linear-gradient(135deg, #f4dcab 0%, #e3ba78 45%, #c49353 100%));
  color: var(--lg-chu, #2b1a12); font-weight: 700; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 14px; }
.lnc-send:disabled { opacity: .5; cursor: default; }
.lnc-error { margin: 0 12px 6px; color: var(--lg-do, #a50e15); font-size: 13px; }
.lnc-error[hidden] { display: none; }
.lnc-compose { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--lg-vien, rgba(145, 90, 32, .28)); background: #fff; align-items: center; }
/* The theme gives every textarea a large min-height; the compose box stays one line tall. */
/* The theme gives every textarea a large min-height and a fixed width; the compose box stays one line tall and
   shrinks so the send button always fits inside the panel. */
.lnc-compose textarea { flex: 1 1 0; width: 0 !important; min-width: 0 !important; resize: none; height: 40px; min-height: 40px !important; max-height: 96px; line-height: 1.4; }
.lnc-compose .lnc-send { flex: 0 0 auto; white-space: nowrap; width: auto; min-width: 56px; height: 40px; margin: 0; }
.lnc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lnc-title { min-width: 0; }
.lnc-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.lnc-restart { border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .15); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; cursor: pointer; font-family: inherit; line-height: 1.2; white-space: nowrap; margin: 0; width: auto;
  text-shadow: 0 1px 2px rgba(101, 57, 16, .45); }
.lnc-restart:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 480px) {
  .lnc-panel { width: calc(var(--lnc-vw, 100vw) - 28px); }
}
