/* ═══════════════════════════════════════════════
   BATHIL BAZAR — FRONTEND CSS v4.1
═══════════════════════════════════════════════ */
:root {
  --bb-blue:   #1A3C8F;
  --bb-dark:   #0F2560;
  --bb-navy:   #071840;
  --bb-yellow: #F5C518;
  --bb-red:    #E53E3E;
  --bb-green:  #10B981;
  --bb-white:  #FFFFFF;
  --bb-bg:     #F0F4FF;
  --bb-border: #DDE3F5;
  --bb-muted:  #8895bb;
  --bb-text:   #1a1a2e;
  --bb-font:   'Poppins', sans-serif;
  --bb-shadow: 0 16px 60px rgba(15,37,96,.3);
  --bb-r:      18px;
}
.bb-dn { display: none !important; }

/* ── SPIN DOTS ──────────────────────────────── */
.bb-spin-dots { display:flex; gap:4px; justify-content:center; }
.bb-spin-dots span { width:7px; height:7px; border-radius:50%; background:var(--bb-blue); animation:bb-bounce 1.2s infinite; }
.bb-spin-dots span:nth-child(2){animation-delay:.2s}
.bb-spin-dots span:nth-child(3){animation-delay:.4s}
@keyframes bb-bounce{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}
@keyframes bb-fadein{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes bb-pulse{0%,100%{opacity:1}50%{opacity:.35}}

/* ══════════════════════════════════════════════
   SEND BUTTON — NUCLEAR FIX
   Force SVG visible regardless of theme CSS
══════════════════════════════════════════════ */
button.bb-page-send,
button.bb-popup-send,
.bb-page-send,
.bb-popup-send {
  width:42px; height:42px; border-radius:50%; border:none;
  background:#F5C518 !important; cursor:pointer; flex-shrink:0;
  display:flex !important; align-items:center !important; justify-content:center !important;
  box-shadow:0 2px 10px rgba(245,197,24,.45);
  transition:transform .15s,box-shadow .15s;
  overflow:visible !important; padding:0 !important;
  line-height:1 !important;
}
button.bb-page-send:hover,
button.bb-popup-send:hover { transform:scale(1.1); box-shadow:0 4px 18px rgba(245,197,24,.6); }
button.bb-page-send:disabled,
button.bb-popup-send:disabled { opacity:.5; cursor:not-allowed; transform:none; }

/* Force SVG inside send buttons to always show */
button.bb-page-send svg,
button.bb-popup-send svg,
.bb-page-send > svg,
.bb-popup-send > svg {
  display:block !important;
  width:18px !important;
  height:18px !important;
  fill:#0F2560 !important;
  overflow:visible !important;
  pointer-events:none;
  flex-shrink:0;
}
button.bb-page-send svg path,
button.bb-popup-send svg path {
  fill:#0F2560 !important;
}

/* ══════════════════════════════════════════════
   ACTION BUTTONS (copy/edit/delete) — SVG only
══════════════════════════════════════════════ */
.bb-msg-actions,
.bb-popup-msg-actions {
  display:none; flex-direction:column; gap:2px;
  background:var(--bb-navy); border:1px solid rgba(255,255,255,.15);
  border-radius:8px; padding:3px;
  box-shadow:0 4px 16px rgba(0,0,0,.4); z-index:20;
}
.bb-page-msg:hover .bb-msg-actions { display:flex; }
.bb-popup-msg:hover .bb-popup-msg-actions { display:flex; }

.bb-ma-btn,
.bb-popup-ma-btn {
  width:28px; height:28px; border:none; background:transparent; cursor:pointer;
  border-radius:6px; display:flex !important; align-items:center !important; justify-content:center !important;
  transition:background .12s; padding:0 !important; flex-shrink:0;
}
.bb-ma-btn:hover,
.bb-popup-ma-btn:hover { background:rgba(255,255,255,.12); }
.bb-ma-del:hover,
.bb-popup-ma-del:hover { background:rgba(229,62,62,.28) !important; }

/* Force action button SVGs to render */
.bb-ma-btn svg,
.bb-popup-ma-btn svg {
  display:block !important;
  width:14px !important; height:14px !important;
  fill:rgba(255,255,255,.75) !important;
  overflow:visible !important;
  pointer-events:none; flex-shrink:0;
}
.bb-ma-del svg,
.bb-popup-ma-del svg { fill:rgba(229,100,100,.9) !important; }
.bb-ma-btn:hover svg,
.bb-popup-ma-btn:hover svg { fill:#fff !important; }

/* ══════════════════════════════════════════════
   FAQ WIDGET
══════════════════════════════════════════════ */
.bb-faq-wrap {
  position:fixed; z-index:99990;
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
.bb-faq-wrap.bb-right { bottom:24px; right:24px; }
.bb-faq-wrap.bb-left  { bottom:24px; left:24px; align-items:flex-start; }

.bb-faq-trigger {
  width:58px; height:58px; border-radius:50%; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 20px rgba(0,0,0,.22);
  transition:transform .22s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
  animation:bb-float 3.5s ease-in-out infinite;
  background:var(--bb-yellow); color:var(--bb-dark);
  overflow:visible !important;
}
@keyframes bb-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.bb-faq-trigger:hover { transform:scale(1.1); animation:none; box-shadow:0 8px 28px rgba(245,197,24,.55); }
.bb-faq-trigger svg {
  display:block !important; width:26px !important; height:26px !important;
  fill:var(--bb-dark) !important; overflow:visible !important; pointer-events:none;
}
.bb-faq-label {
  background:var(--bb-dark); color:#fff; font-size:10px; font-weight:700;
  padding:3px 11px; border-radius:20px; font-family:var(--bb-font); white-space:nowrap;
  opacity:0; transform:translateY(4px); transition:opacity .2s,transform .2s; pointer-events:none;
}
.bb-faq-wrap:hover .bb-faq-label { opacity:1; transform:translateY(0); }

.bb-faq-popup {
  position:fixed; width:340px; max-height:78vh;
  background:var(--bb-dark); border-radius:var(--bb-r); box-shadow:var(--bb-shadow);
  display:flex; flex-direction:column; overflow:hidden;
  animation:bb-popup-in .3s cubic-bezier(.34,1.56,.64,1); z-index:99991;
  border:1px solid rgba(255,255,255,.1);
}
.bb-right .bb-faq-popup { bottom:90px; right:24px; }
.bb-left  .bb-faq-popup { bottom:90px; left:24px; }
@keyframes bb-popup-in{from{opacity:0;transform:scale(.88) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}

.bb-faq-head {
  background:linear-gradient(135deg,var(--bb-navy),var(--bb-dark));
  padding:12px 14px; display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0; border-bottom:1px solid rgba(255,255,255,.07);
}
.bb-faq-head-l { display:flex; align-items:center; gap:10px; }
.bb-faq-av {
  width:36px; height:36px; border-radius:50%; background:var(--bb-yellow);
  color:var(--bb-dark); font-size:15px; font-weight:800; font-family:var(--bb-font);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.bb-faq-title { color:#fff; font-size:13px; font-weight:700; font-family:var(--bb-font); line-height:1.2; }
.bb-faq-sub   { color:rgba(255,255,255,.5); font-size:10px; font-family:var(--bb-font); margin-top:2px; }
.bb-faq-close-btn {
  width:26px; height:26px; border-radius:8px; background:rgba(255,255,255,.12);
  border:none; color:#fff; font-size:14px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .15s; flex-shrink:0;
}
.bb-faq-close-btn:hover { background:rgba(255,255,255,.22); }
.bb-faq-search-wrap { padding:8px 10px; background:rgba(0,0,0,.2); flex-shrink:0; }
.bb-faq-search-box {
  display:flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15);
  border-radius:20px; padding:0 12px; transition:border-color .2s;
}
.bb-faq-search-box:focus-within { border-color:var(--bb-yellow); }
.bb-search-ico { color:rgba(255,255,255,.4); flex-shrink:0; display:block !important; width:16px !important; height:16px !important; fill:rgba(255,255,255,.4) !important; }
#bb-faq-search {
  flex:1; border:none; outline:none; background:transparent;
  font-size:12px; font-family:var(--bb-font); padding:8px 0; color:#fff;
}
#bb-faq-search::placeholder { color:rgba(255,255,255,.35); }
.bb-search-clear { font-size:12px; color:rgba(255,255,255,.4); cursor:pointer; flex-shrink:0; }
.bb-search-clear:hover { color:var(--bb-red); }
.bb-faq-list { flex:1; overflow-y:auto; padding:4px 0; }
.bb-faq-list::-webkit-scrollbar { width:3px; }
.bb-faq-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:3px; }
.bb-faq-loading { display:flex; flex-direction:column; align-items:center; gap:6px; padding:24px; color:rgba(255,255,255,.4); font-size:11px; font-family:var(--bb-font); }
.bb-faq-loading .bb-spin-dots span { background:var(--bb-yellow); }
.bb-faq-item { border-bottom:1px solid rgba(255,255,255,.05); cursor:pointer; transition:background .12s; }
.bb-faq-item:last-child { border-bottom:none; }
.bb-faq-item:hover { background:rgba(255,255,255,.05); }
.bb-faq-q {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; gap:8px; font-size:12.5px; font-weight:600;
  color:rgba(255,255,255,.88); font-family:var(--bb-font); line-height:1.4;
}
.bb-faq-q-text { flex:1; }
.bb-faq-chevron {
  width:18px; height:18px; border-radius:50%; background:rgba(255,255,255,.1);
  display:flex; align-items:center; justify-content:center;
  font-size:9px; flex-shrink:0; color:var(--bb-yellow);
  transition:transform .2s,background .15s;
}
.bb-faq-item.open .bb-faq-chevron { transform:rotate(180deg); background:var(--bb-yellow); color:var(--bb-dark); }
.bb-faq-a {
  max-height:0; overflow:hidden; transition:max-height .28s ease,padding .2s;
  font-size:12px; color:rgba(255,255,255,.6); font-family:var(--bb-font); line-height:1.6; padding:0 12px;
}
.bb-faq-item.open .bb-faq-a { max-height:300px; padding:0 12px 10px; }
.bb-highlight { background:rgba(245,197,24,.3); border-radius:3px; padding:0 1px; }
.bb-faq-empty { padding:24px 16px; text-align:center; color:rgba(255,255,255,.35); font-size:12px; font-family:var(--bb-font); line-height:1.6; }
.bb-faq-empty-ico { font-size:32px; margin-bottom:6px; }
.bb-faq-chat-cta {
  padding:10px 12px; background:rgba(0,0,0,.3);
  display:flex; align-items:center; justify-content:space-between; gap:8px; flex-shrink:0;
  border-top:1px solid rgba(255,255,255,.07);
}
.bb-faq-chat-cta span { color:rgba(255,255,255,.55); font-size:11px; font-family:var(--bb-font); }
.bb-faq-chat-btn {
  padding:6px 14px; background:var(--bb-yellow); color:var(--bb-dark);
  font-size:11px; font-weight:700; border-radius:20px; text-decoration:none;
  font-family:var(--bb-font); white-space:nowrap; transition:opacity .15s;
  border:none; cursor:pointer; display:inline-flex; align-items:center; gap:5px;
}
.bb-faq-chat-btn:hover { opacity:.88; }

/* ══════════════════════════════════════════════
   [bb_chat_page] — Full page chat
══════════════════════════════════════════════ */
.bb-page-chat-wrap {
  display:flex; border-radius:16px; overflow:hidden;
  box-shadow:0 4px 32px rgba(15,37,96,.18);
  border:1px solid rgba(255,255,255,.08);
  background:var(--bb-dark); font-family:var(--bb-font);
  min-height:520px; position:relative;
}

/* ── Sidebar ── */
.bb-page-sidebar {
  width:240px; flex-shrink:0; background:var(--bb-navy);
  display:flex; flex-direction:column;
  border-right:1px solid rgba(255,255,255,.06);
  transition:transform .25s ease;
}
.bb-page-sb-head {
  padding:12px 10px; border-bottom:1px solid rgba(255,255,255,.07);
  display:flex; align-items:center; justify-content:space-between; gap:6px; flex-shrink:0;
}
.bb-page-sb-logo { display:flex; align-items:center; gap:5px; color:var(--bb-yellow); font-size:12px; font-weight:700; }
.bb-page-sb-logo svg { display:block !important; width:16px !important; height:16px !important; fill:var(--bb-yellow) !important; overflow:visible !important; }
.bb-page-sb-close {
  display:none; width:26px; height:26px; border-radius:7px;
  background:rgba(255,255,255,.1); border:none; color:#fff; cursor:pointer;
  align-items:center; justify-content:center; flex-shrink:0; margin-left:auto;
}
.bb-page-new-btn {
  padding:4px 10px; background:rgba(245,197,24,.15); border:1px solid rgba(245,197,24,.3);
  color:var(--bb-yellow); font-size:10px; font-weight:700; border-radius:20px;
  cursor:pointer; font-family:var(--bb-font); transition:all .15s; white-space:nowrap;
}
.bb-page-new-btn:hover { background:var(--bb-yellow); color:var(--bb-dark); }
.bb-page-chat-list { flex:1; overflow-y:auto; }
.bb-page-chat-list::-webkit-scrollbar { width:3px; }
.bb-page-chat-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); border-radius:3px; }
.bb-page-list-loading { padding:24px; display:flex; justify-content:center; }
.bb-page-list-loading .bb-spin-dots span { background:var(--bb-yellow); }
.bb-page-list-empty { padding:20px 12px; text-align:center; color:rgba(255,255,255,.25); font-size:11px; }
.bb-page-chat-item {
  padding:10px 10px; cursor:pointer; border-bottom:1px solid rgba(255,255,255,.05);
  display:flex; align-items:flex-start; gap:7px; transition:background .12s; position:relative;
}
.bb-page-chat-item:hover { background:rgba(255,255,255,.06); }
.bb-page-chat-item.active { background:rgba(255,255,255,.1); border-left:3px solid var(--bb-yellow); }
.bb-pci-left { flex:1; min-width:0; }
.bb-pci-dept    { color:#fff; font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-pci-preview { color:rgba(255,255,255,.38); font-size:10px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-pci-right { display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex-shrink:0; }
.bb-pci-badge {
  background:var(--bb-red); color:#fff; font-size:9px; font-weight:700;
  min-width:16px; height:16px; border-radius:8px; padding:0 3px;
  display:flex; align-items:center; justify-content:center;
}
.bb-pci-del {
  width:20px; height:20px; background:none; border:none;
  color:rgba(255,255,255,.25); cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center; border-radius:4px; transition:all .15s;
}
.bb-pci-del:hover { background:rgba(229,62,62,.2); color:var(--bb-red); }
.bb-pci-del svg { display:block !important; width:12px !important; height:12px !important; fill:currentColor !important; overflow:visible !important; }

/* Mobile sidebar overlay backdrop */
.bb-mob-backdrop {
  display:none; position:absolute; inset:0;
  background:rgba(0,0,0,.55); z-index:50; border-radius:16px;
}
.bb-mob-backdrop.bb-open { display:block; }

/* ── Main area ── */
.bb-page-main { flex:1; display:flex; flex-direction:column; overflow:hidden; background:var(--bb-dark); min-width:0; }

/* Mobile hamburger — hidden on desktop */
.bb-mob-menu-btn {
  display:none; width:32px; height:32px; border-radius:8px;
  background:rgba(255,255,255,.1); border:none; color:#fff; cursor:pointer;
  align-items:center; justify-content:center; flex-shrink:0; transition:background .15s;
}
.bb-mob-menu-btn:hover { background:rgba(255,255,255,.2); }
.bb-mob-menu-btn svg { display:block !important; width:16px !important; height:16px !important; fill:#fff !important; overflow:visible !important; }

/* Dept screen */
.bb-page-dept-screen { flex:1; display:flex; flex-direction:column; overflow-y:auto; }
.bb-page-welcome {
  display:flex; align-items:center; gap:12px; padding:16px 16px 14px;
  background:var(--bb-navy); border-bottom:1px solid rgba(255,255,255,.07); flex-shrink:0;
}
.bb-page-welc-av {
  width:44px; height:44px; border-radius:50%; flex-shrink:0;
  background:var(--bb-yellow); color:var(--bb-dark); font-size:18px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.bb-page-welc-text strong { color:#fff; font-size:13px; font-weight:700; display:block; }
.bb-page-welc-text span   { color:rgba(255,255,255,.5); font-size:11px; }
.bb-page-dept-label { padding:12px 16px 6px; font-size:10px; font-weight:700; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:.5px; flex-shrink:0; }
.bb-page-dept-grid  { padding:0 12px 16px; display:flex; flex-direction:column; gap:6px; }
.bb-page-dept-btn {
  padding:12px 14px; border:1.5px solid rgba(255,255,255,.1); border-radius:12px;
  background:rgba(255,255,255,.05); color:rgba(255,255,255,.85); font-size:12px; font-weight:500;
  font-family:var(--bb-font); cursor:pointer; text-align:left;
  display:flex; align-items:center; justify-content:space-between; transition:all .18s;
}
.bb-page-dept-btn:hover { border-color:var(--bb-yellow); background:rgba(245,197,24,.1); transform:translateX(3px); }
.bb-page-dept-arr { color:var(--bb-yellow); font-size:15px; opacity:0; transition:opacity .15s,transform .15s; }
.bb-page-dept-btn:hover .bb-page-dept-arr { opacity:1; transform:translateX(3px); }

/* Chat screen */
.bb-page-chat-screen { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.bb-page-chat-head {
  background:linear-gradient(135deg,var(--bb-navy),var(--bb-dark));
  padding:10px 14px; display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0; border-bottom:1px solid rgba(255,255,255,.07);
}
.bb-page-chat-head-l { display:flex; align-items:center; gap:8px; }
.bb-page-back-btn {
  width:30px; height:30px; border-radius:8px; background:rgba(255,255,255,.1);
  border:none; color:#fff; cursor:pointer; display:flex; align-items:center;
  justify-content:center; flex-shrink:0; transition:background .15s;
}
.bb-page-back-btn:hover { background:rgba(255,255,255,.2); }
.bb-page-back-btn svg { display:block !important; width:16px !important; height:16px !important; fill:#fff !important; overflow:visible !important; }
.bb-page-head-av {
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  background:var(--bb-yellow); color:var(--bb-dark); font-size:14px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.bb-page-head-name { color:#fff; font-size:13px; font-weight:700; line-height:1.2; }
.bb-page-head-sub  { color:rgba(255,255,255,.5); font-size:10px; margin-top:1px; display:flex; align-items:center; gap:4px; }
.bb-page-head-r { display:flex; align-items:center; gap:5px; }
.bb-page-online-dot { width:7px; height:7px; border-radius:50%; background:#4ADE80; animation:bb-pulse 2s infinite; }
.bb-page-online-txt { color:rgba(255,255,255,.6); font-size:11px; font-family:var(--bb-font); }

/* Messages */
.bb-page-msgs {
  flex:1; overflow-y:auto; padding:10px;
  display:flex; flex-direction:column; gap:2px; scroll-behavior:smooth;
  background:var(--bb-dark);
}
.bb-page-msgs::-webkit-scrollbar { width:3px; }
.bb-page-msgs::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); border-radius:3px; }

.bb-page-dsep { text-align:center; margin:8px 0 6px; }
.bb-page-dsep span {
  background:rgba(255,255,255,.07); color:rgba(255,255,255,.4);
  font-size:10px; font-weight:600; padding:3px 12px; border-radius:20px; font-family:var(--bb-font);
}

.bb-page-msg { display:flex; flex-direction:column; max-width:78%; animation:bb-fadein .22s ease; }
.bb-page-out { align-self:flex-end; align-items:flex-end; }
.bb-page-in  { align-self:flex-start; align-items:flex-start; }

.bb-page-bbl-wrap { position:relative; display:flex; align-items:center; gap:4px; }
.bb-page-out .bb-page-bbl-wrap { flex-direction:row-reverse; }

.bb-page-bbl {
  padding:8px 12px; border-radius:15px; font-size:13px; line-height:1.55;
  word-break:break-word; font-family:var(--bb-font);
}
.bb-page-out .bb-page-bbl {
  background:linear-gradient(135deg,var(--bb-blue),#2550c0);
  color:#fff; border-bottom-right-radius:4px; box-shadow:0 2px 8px rgba(26,60,143,.3);
}
.bb-page-in .bb-page-bbl {
  background:rgba(255,255,255,.1); color:rgba(255,255,255,.9);
  border:1px solid rgba(255,255,255,.1); border-bottom-left-radius:4px;
}
.bb-page-bbl.bb-deleted { opacity:.45; font-style:italic; }
.bb-edited-tag { font-size:9px; color:rgba(255,255,255,.5); margin-left:4px; font-style:italic; }

.bb-page-meta { display:flex; align-items:center; gap:4px; margin-top:2px; padding:0 3px; }
.bb-page-t { font-size:10px; color:rgba(255,255,255,.35); font-family:var(--bb-font); }
.bb-ps { font-size:10px; font-weight:600; font-family:var(--bb-font); }
.bb-ps.seen { color:var(--bb-yellow); }
.bb-ps.del  { color:rgba(255,255,255,.4); }
.bb-delete-warning {
  background:rgba(229,62,62,.15); border:1px solid rgba(229,62,62,.3);
  color:#fca5a5; font-size:10px; font-family:var(--bb-font);
  padding:5px 8px; border-radius:8px; margin-top:4px; animation:bb-fadein .2s ease;
}
.bb-page-loading,.bb-page-empty {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; color:rgba(255,255,255,.35); font-size:12px; font-family:var(--bb-font);
  text-align:center; padding:20px;
}
.bb-page-loading .bb-spin-dots span { background:var(--bb-yellow); }

/* Input row */
.bb-page-input-row {
  display:flex; align-items:flex-end; gap:8px; padding:8px 10px 10px;
  background:var(--bb-navy); border-top:1px solid rgba(255,255,255,.07); flex-shrink:0;
}
#bb-page-inp {
  flex:1; border:1.5px solid rgba(255,255,255,.12); border-radius:20px;
  padding:8px 14px; font-size:13px; font-family:var(--bb-font);
  resize:none; outline:none; background:rgba(255,255,255,.08); color:#fff;
  line-height:1.4; max-height:110px; transition:border-color .2s;
}
#bb-page-inp::placeholder { color:rgba(255,255,255,.3); }
#bb-page-inp:focus { border-color:var(--bb-yellow); }

.bb-shortcode-login {
  text-align:center; padding:60px 30px; font-family:var(--bb-font);
  background:linear-gradient(135deg,var(--bb-dark),var(--bb-blue));
  border-radius:20px; color:#fff;
}

/* ══════════════════════════════════════════════
   [bb_chat_popup] — Resizable floating popup
══════════════════════════════════════════════ */
.bb-popup-trigger-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 24px; background:var(--bb-yellow); color:var(--bb-dark);
  font-size:14px; font-weight:700; border-radius:30px; cursor:pointer;
  border:none; font-family:var(--bb-font);
  box-shadow:0 4px 18px rgba(245,197,24,.4);
  transition:transform .15s,box-shadow .15s;
}
.bb-popup-trigger-btn:hover { transform:translateY(-2px); box-shadow:0 6px 24px rgba(245,197,24,.55); }
.bb-popup-trigger-btn svg { display:block !important; width:18px !important; height:18px !important; fill:var(--bb-dark) !important; overflow:visible !important; }

.bb-popup-overlay {
  position:fixed; inset:0; background:rgba(7,24,64,.6);
  z-index:99992; display:flex; align-items:center; justify-content:center;
  animation:bb-ov-in .2s ease; backdrop-filter:blur(2px);
}
@keyframes bb-ov-in{from{opacity:0}to{opacity:1}}
.bb-popup-overlay.bb-dn { display:none !important; }

.bb-popup-win {
  background:var(--bb-dark); border-radius:18px; overflow:hidden;
  box-shadow:0 24px 80px rgba(7,24,64,.55);
  display:flex; flex-direction:column;
  width:440px; height:620px; max-width:calc(100vw - 20px); max-height:calc(100vh - 40px);
  position:relative; resize:both; min-width:320px; min-height:420px;
  border:1px solid rgba(255,255,255,.1);
  animation:bb-win-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes bb-win-in{from{opacity:0;transform:scale(.88)}to{opacity:1;transform:scale(1)}}

.bb-popup-head {
  background:linear-gradient(135deg,var(--bb-navy),var(--bb-dark));
  padding:12px 14px; display:flex; align-items:center; gap:10px;
  flex-shrink:0; border-bottom:1px solid rgba(255,255,255,.08);
  cursor:move; user-select:none;
}
.bb-popup-av {
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  background:var(--bb-yellow); color:var(--bb-dark); font-size:16px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.bb-popup-head-info { flex:1; min-width:0; }
.bb-popup-head-name { color:#fff; font-size:13px; font-weight:700; line-height:1.2; }
.bb-popup-head-sub  { color:rgba(255,255,255,.55); font-size:10px; margin-top:2px; display:flex; align-items:center; gap:4px; }
.bb-popup-head-dot  { width:6px; height:6px; border-radius:50%; background:#4ADE80; animation:bb-pulse 2s infinite; }
.bb-popup-ctrls { display:flex; gap:5px; flex-shrink:0; }
.bb-popup-ctrl {
  width:28px; height:28px; border-radius:8px; background:rgba(255,255,255,.1);
  border:none; color:rgba(255,255,255,.7); cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .15s;
}
.bb-popup-ctrl:hover { background:rgba(255,255,255,.2); }
.bb-popup-ctrl.close:hover { background:rgba(229,62,62,.4); }
.bb-popup-ctrl svg { display:block !important; width:14px !important; height:14px !important; fill:rgba(255,255,255,.8) !important; overflow:visible !important; pointer-events:none; }

.bb-popup-body { flex:1; display:flex; flex-direction:column; overflow:hidden; }

.bb-popup-win.bb-minimized {
  position:fixed; bottom:24px; right:24px; width:auto; height:auto;
  min-width:0; min-height:0; resize:none; border-radius:30px;
  animation:none; z-index:99993;
}
.bb-popup-win.bb-minimized .bb-popup-head { border-radius:30px; padding:8px 14px; cursor:pointer; }
.bb-popup-win.bb-minimized .bb-popup-body { display:none; }

.bb-popup-dept-screen { flex:1; overflow-y:auto; display:flex; flex-direction:column; }
.bb-popup-welcome {
  display:flex; align-items:center; gap:12px; padding:14px 14px 12px;
  background:var(--bb-navy); flex-shrink:0;
}
.bb-popup-welc-av {
  width:40px; height:40px; border-radius:50%; flex-shrink:0;
  background:var(--bb-yellow); color:var(--bb-dark); font-size:16px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.bb-popup-welc-text strong { color:#fff; font-size:13px; font-weight:700; display:block; }
.bb-popup-welc-text span   { color:rgba(255,255,255,.5); font-size:11px; }
.bb-popup-dept-label { padding:10px 14px 5px; font-size:10px; font-weight:700; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:.5px; }
.bb-popup-dept-grid  { padding:0 10px 14px; display:flex; flex-direction:column; gap:6px; }
.bb-popup-dept-btn {
  padding:11px 12px; border:1.5px solid rgba(255,255,255,.1); border-radius:10px;
  background:rgba(255,255,255,.04); color:rgba(255,255,255,.85); font-size:12px;
  font-weight:500; font-family:var(--bb-font); cursor:pointer; text-align:left;
  display:flex; align-items:center; justify-content:space-between; transition:all .15s;
}
.bb-popup-dept-btn:hover { border-color:var(--bb-yellow); background:rgba(245,197,24,.08); }
.bb-popup-dept-arr { color:var(--bb-yellow); opacity:0; transition:opacity .15s; font-size:14px; }
.bb-popup-dept-btn:hover .bb-popup-dept-arr { opacity:1; }

.bb-popup-chat-screen { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.bb-popup-msgs {
  flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column;
  gap:2px; scroll-behavior:smooth;
}
.bb-popup-msgs::-webkit-scrollbar { width:3px; }
.bb-popup-msgs::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); border-radius:3px; }

.bb-popup-msg { display:flex; flex-direction:column; max-width:80%; animation:bb-fadein .22s ease; }
.bb-popup-out { align-self:flex-end; align-items:flex-end; }
.bb-popup-in  { align-self:flex-start; align-items:flex-start; }
.bb-popup-bbl {
  padding:8px 12px; border-radius:15px; font-size:12.5px; line-height:1.55;
  word-break:break-word; font-family:var(--bb-font);
}
.bb-popup-out .bb-popup-bbl {
  background:linear-gradient(135deg,var(--bb-blue),#2550c0);
  color:#fff; border-bottom-right-radius:4px; box-shadow:0 2px 8px rgba(26,60,143,.3);
}
.bb-popup-in .bb-popup-bbl {
  background:rgba(255,255,255,.1); color:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.1); border-bottom-left-radius:4px;
}
.bb-popup-bbl.bb-deleted { opacity:.45; font-style:italic; }
.bb-popup-meta { display:flex; align-items:center; gap:4px; margin-top:2px; padding:0 3px; }
.bb-popup-t    { font-size:10px; color:rgba(255,255,255,.35); font-family:var(--bb-font); }
.bb-popup-status { font-size:10px; font-weight:600; font-family:var(--bb-font); }
.bb-popup-status.seen { color:var(--bb-yellow); }
.bb-popup-status.del  { color:rgba(255,255,255,.4); }
.bb-popup-bbl-wrap { position:relative; display:flex; align-items:center; gap:3px; }
.bb-popup-out .bb-popup-bbl-wrap { flex-direction:row-reverse; }
.bb-popup-dsep { text-align:center; margin:6px 0 4px; }
.bb-popup-dsep span {
  background:rgba(255,255,255,.07); color:rgba(255,255,255,.4);
  font-size:10px; padding:3px 10px; border-radius:20px; font-family:var(--bb-font);
}
.bb-popup-loading,.bb-popup-empty {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; color:rgba(255,255,255,.35); font-size:12px; text-align:center; padding:16px;
}
.bb-popup-loading .bb-spin-dots span { background:var(--bb-yellow); }

.bb-popup-input-row {
  display:flex; align-items:flex-end; gap:7px; padding:8px 10px 10px;
  background:var(--bb-navy); border-top:1px solid rgba(255,255,255,.07); flex-shrink:0;
}
.bb-popup-inp {
  flex:1; border:1.5px solid rgba(255,255,255,.12); border-radius:18px;
  padding:7px 12px; font-size:12.5px; font-family:var(--bb-font);
  resize:none; outline:none; background:rgba(255,255,255,.08); color:#fff;
  line-height:1.4; max-height:90px; transition:border-color .2s;
}
.bb-popup-inp::placeholder { color:rgba(255,255,255,.3); }
.bb-popup-inp:focus { border-color:var(--bb-yellow); }

/* ══════════════════════════════════════════════
   RATING
══════════════════════════════════════════════ */
.bb-rating-card {
  margin:8px 10px; background:rgba(255,255,255,.07);
  border:1px solid rgba(245,197,24,.2); border-radius:14px; padding:14px;
  font-family:var(--bb-font); animation:bb-fadein .3s ease;
}
.bb-rating-card.in-popup { margin:8px 0; }
.bb-rating-title { font-size:13px; font-weight:700; color:#fff; margin-bottom:3px; }
.bb-rating-sub   { font-size:11px; color:rgba(255,255,255,.5); margin-bottom:12px; }
.bb-rating-stars { display:flex; gap:6px; margin-bottom:12px; }
.bb-rating-star  { font-size:24px; cursor:pointer; transition:transform .15s; filter:grayscale(1) opacity(.4); }
.bb-rating-star.active,.bb-rating-star:hover { filter:none; transform:scale(1.2); }
.bb-rating-suggestions { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.bb-rating-sug {
  padding:5px 12px; border-radius:20px; border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.06); color:rgba(255,255,255,.7); font-size:11px;
  font-family:var(--bb-font); cursor:pointer; transition:all .15s;
}
.bb-rating-sug.selected { background:rgba(245,197,24,.2); border-color:var(--bb-yellow); color:var(--bb-yellow); }
.bb-rating-custom {
  width:100%; box-sizing:border-box; padding:7px 10px;
  border:1px solid rgba(255,255,255,.12); border-radius:10px;
  background:rgba(255,255,255,.07); color:#fff; font-size:12px;
  font-family:var(--bb-font); outline:none; resize:none;
  transition:border-color .2s; margin-bottom:10px;
}
.bb-rating-custom::placeholder { color:rgba(255,255,255,.3); }
.bb-rating-custom:focus { border-color:var(--bb-yellow); }
.bb-rating-submit {
  width:100%; padding:9px; background:var(--bb-yellow); color:var(--bb-dark);
  font-size:13px; font-weight:700; border:none; border-radius:10px;
  cursor:pointer; font-family:var(--bb-font); transition:opacity .15s;
}
.bb-rating-submit:hover { opacity:.88; }
.bb-rating-done { text-align:center; padding:8px 0; color:rgba(255,255,255,.6); font-size:12px; }

/* ══════════════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width:640px) {
  /* FAQ popup */
  .bb-faq-popup { width:calc(100vw - 20px) !important; right:10px !important; left:10px !important; max-height:80vh; bottom:80px !important; }
  .bb-faq-wrap.bb-right { bottom:16px; right:14px; }
  .bb-faq-wrap.bb-left  { bottom:16px; left:14px; }

  /* Full page chat — sidebar becomes slide-in drawer */
  .bb-page-chat-wrap {
    flex-direction:row; height:100svh !important; min-height:unset; border-radius:0;
  }
  .bb-page-sidebar {
    position:absolute; top:0; left:0; bottom:0; z-index:60;
    width:260px !important; transform:translateX(-100%);
    box-shadow:4px 0 20px rgba(0,0,0,.4);
  }
  .bb-page-sidebar.bb-mob-open {
    transform:translateX(0);
  }
  .bb-mob-backdrop { border-radius:0; }
  /* Show close X inside sidebar header on mobile */
  .bb-page-sb-close { display:flex !important; }
  /* Show hamburger menu button */
  .bb-mob-menu-btn { display:flex !important; }
  /* Adjust main area to be full width */
  .bb-page-main { width:100%; }

  /* Popup chat → bottom sheet */
  .bb-popup-overlay { align-items:flex-end; backdrop-filter:none; }
  .bb-popup-win {
    width:100vw !important; height:90svh !important; max-width:100vw;
    border-radius:18px 18px 0 0; resize:none;
  }
  .bb-popup-win.bb-minimized {
    width:auto !important; height:auto !important;
    border-radius:30px; bottom:12px; right:12px;
  }
}
@media (max-width:380px) {
  .bb-page-head-name,.bb-popup-head-name { font-size:12px; }
  .bb-page-online-txt { display:none; }
}
