/* /shared/lia/lia-drawer.css — LQ-1021 (supersedes Overhaul Cycle 1 sizing).
   Lia presence rules: Lia NEVER auto-opens; she stays minimized until a
   visitor clicks the fab. When opened, ONLY the chat opens, as a SMALL
   corner panel on mobile AND desktop — explicitly NOT the former 85dvh
   bottom sheet and NOT a full-height drawer/slide-over.
   State = #lumiPanel[data-open="true"], mirrored to the legacy .on class
   by lia-drawer.js. */

/* ---- minimized launcher: 56px circular avatar button ---- */
#lumiFab {
  width: 3.5rem; height: 3.5rem; min-height: 3.5rem;
  padding: 0; border-radius: 50%;
  align-items: center; justify-content: center; gap: 0;
  overflow: visible;
}
#lumiFab b { display: none; }
#lumiFab .fab-av, #lumiFab .lia-avatar {
  width: 100% !important; height: 100% !important; border-radius: 50%;
}
#lumiFab [data-lia-live] { width: 100% !important; height: 100% !important; }
#lumiFab .fab-dot {
  position: absolute; top: 1px; right: 1px;
  width: 12px; height: 12px;
  border: 2px solid var(--bg, #0a0a0b);
}

/* ---- open chat: SMALL corner panel (base / mobile) ---- */
#lumiPanel {
  position: fixed;
  top: auto; left: auto;
  right: 0.75rem; bottom: 5.25rem;
  width: min(330px, calc(100vw - 1.5rem));
  height: min(430px, calc(100dvh - 7rem));
  max-height: calc(100dvh - 7rem);
  z-index: 320;
  display: flex !important; flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--line-strong, #3a3a40);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  visibility: hidden;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease, visibility 0s linear 220ms;
}
#lumiPanel[data-open="true"] {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease, visibility 0s;
}
#lumiPanel.lia-dragging { transition: none; }

/* ---- open chat: SMALL corner panel (desktop) ---- */
@media (min-width: 768px) {
  #lumiPanel {
    right: 1.25rem; bottom: 1.25rem;
    width: 350px;
    height: min(500px, calc(100dvh - 2.5rem));
    max-height: calc(100dvh - 2.5rem);
  }
}

/* ---- no sheet drag handle, no modal backdrop (corner widget) ---- */
.lia-drag-handle { display: none !important; }
.lia-backdrop { display: none !important; }

/* ---- drawer ergonomics: >=44px targets, >=16px inputs (Part D) ---- */
#lumiPanel .icon-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
}
#lumiPanel .corner-quick button { min-height: 44px; }
#lumiPanel input, #lumiPanel select, #lumiPanel textarea {
  font-size: 16px !important;
}
#lumiPanel .corner-form button { min-height: 44px; }

/* ---- expression stack: <picture> children (Lia sprites, LQ-995) ---- */
.lia-expr-stack > picture {
  position: absolute; inset: 0; display: block;
  opacity: 0; transition: opacity 0.45s ease;
}
.lia-expr-stack > picture.on { opacity: 1; }
.lia-expr-stack > picture > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
[data-lia-live] picture { display: block; width: 100%; height: 100%; }
[data-lia-live] picture > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (prefers-reduced-motion: reduce) {
  #lumiPanel { transition: none; }
  .lia-expr-stack > picture { transition: none; }
}
