/* livechat.css — public-facing live chat widget (floating bubble, bottom-right) */

#lcWidget * { box-sizing: border-box; }

#lcBubble {
  position: fixed; bottom: 22px; right: 22px; z-index: 9990;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--navy, #0F2342); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(15,35,66,.5);
  transition: transform .2s ease;
}
#lcBubble:hover { transform: scale(1.06); }
#lcBubble .lc-bubble-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--saffron, #C9922E); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 19px; height: 19px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
}

#lcPanel {
  position: fixed; bottom: 92px; right: 22px; z-index: 9991;
  width: 350px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35);
  display: none; flex-direction: column;
  opacity: 0; transform: translateY(14px) scale(.97);
  transition: opacity .2s ease, transform .2s ease;
}
#lcPanel.open { display: flex; opacity: 1; transform: translateY(0) scale(1); }

/* #lcBody wraps either the gate form or the chat pane — it must be a
   constrained flex child so its inner .lc-chat-body (overflow-y:auto)
   actually scrolls internally instead of growing the whole panel and
   pushing the input bar below the visible area. */
#lcBody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

#lcBody {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* critical: lets the flex child below actually shrink and scroll instead of overflowing the panel */
  overflow: hidden;
}

.lc-panel-head {
  background: var(--navy, #0F2342); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.lc-panel-head-icon {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lc-panel-head-text { flex: 1; min-width: 0; }
.lc-panel-head-text .t1 { font-size: 14px; font-weight: 700; }
.lc-panel-head-text .t2 { font-size: 11.5px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; }
.lc-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; flex-shrink: 0; }
.lc-panel-close {
  background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lc-panel-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Gate form (name/mobile/email) ── */
.lc-gate { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 22px 20px; overflow-y: auto; }
.lc-gate h3 { font-size: 16px; color: var(--ink, #0D1B2A); margin: 0 0 4px; font-family: var(--font-display, inherit); }
.lc-gate p { font-size: 12.5px; color: var(--slate, #5A6F87); margin: 0 0 16px; }
.lc-gate label { display: block; font-size: 11.5px; font-weight: 600; color: var(--slate, #5A6F87); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 5px; }
.lc-gate .lc-field { margin-bottom: 13px; }
.lc-gate input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--hairline-dark, #C5CEDD);
  border-radius: 8px; font-size: 13.5px; outline: none; transition: border-color .15s;
}
.lc-gate input:focus { border-color: var(--navy, #0F2342); }
.lc-gate-error { color: #B91C1C; font-size: 12px; margin-bottom: 10px; display: none; }
.lc-gate-submit {
  background: var(--navy, #0F2342); color: #fff; border: none; border-radius: 8px;
  padding: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer; margin-top: 4px;
}
.lc-gate-submit:hover { background: var(--navy-deep, #08152A); }
.lc-gate-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Chat pane ── */
.lc-chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; background: var(--mist, #F5F7FB); display: flex; flex-direction: column; gap: 9px; }
.lc-chat-msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-wrap: break-word; }
.lc-chat-msg.in { background: #fff; align-self: flex-start; border-bottom-left-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.lc-chat-msg.out { background: var(--navy, #0F2342); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.lc-chat-msg-time { font-size: 9.5px; opacity: .6; margin-top: 3px; }
.lc-chat-hint { text-align: center; color: var(--slate-light, #96A8BE); font-size: 12px; padding: 14px 8px; }

.lc-chat-input-bar { padding: 10px 12px; border-top: 1px solid var(--hairline, #DDE3EC); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.lc-chat-input-bar textarea {
  flex: 1; border: 1.5px solid var(--hairline-dark, #C5CEDD); border-radius: 18px;
  padding: 9px 14px; font-size: 13px; resize: none; max-height: 80px; outline: none; font-family: inherit;
}
.lc-chat-input-bar textarea:focus { border-color: var(--navy, #0F2342); }
.lc-chat-send {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy, #0F2342); color: #fff;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lc-chat-send:hover { background: var(--navy-deep, #08152A); }

@media (max-width: 420px) {
  #lcPanel { right: 12px; bottom: 82px; width: calc(100vw - 24px); }
  #lcBubble { right: 16px; bottom: 16px; }
}
