/* Floating Assistant Bot — front-end styles
   All colours/sizes come from CSS custom properties set inline per instance,
   so multiple bots with different branding can exist on the same page. */

.fbw-root{
  --fbw-primary:#071f43;
  --fbw-accent:#d99a19;
  --fbw-launcher-size:64px;
  position:fixed;
  bottom:22px;
  z-index:99999;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.fbw-pos-right{ right:22px; }
.fbw-pos-left{ left:22px; }

/* ---------- Launcher ---------- */
.fbw-launcher{
  width:var(--fbw-launcher-size);
  height:var(--fbw-launcher-size);
  border-radius:50%;
  background:var(--fbw-primary);
  border:3px solid var(--fbw-accent);
  box-shadow:0 8px 24px rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  position:relative;
  transition:transform .18s ease, box-shadow .18s ease;
}
.fbw-launcher:hover{ transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.28); }
.fbw-launcher:focus-visible{ outline:3px solid var(--fbw-accent); outline-offset:3px; }

.fbw-launcher-avatar{
  width:100%; height:100%; border-radius:50%; overflow:hidden;
  display:flex; align-items:center; justify-content:center; color:#fff;
}
.fbw-launcher-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.fbw-launcher-fallback{ display:flex; align-items:center; justify-content:center; width:100%; height:100%; color:#fff; }

.fbw-launcher-close{
  position:absolute; inset:0; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:#fff; background:var(--fbw-primary);
  opacity:0; transform:scale(.6); transition:opacity .15s ease, transform .15s ease;
  pointer-events:none;
}
.fbw-root.is-open .fbw-launcher-close{ opacity:1; transform:scale(1); pointer-events:auto; }
.fbw-root.is-open .fbw-launcher-avatar{ opacity:0; }

.fbw-launcher-label{
  position:absolute;
  top:50%; transform:translateY(-50%);
  white-space:nowrap;
  background:#fff;
  color:var(--fbw-primary);
  font-size:13px; font-weight:700;
  padding:8px 14px;
  border-radius:20px;
  box-shadow:0 4px 14px rgba(0,0,0,.14);
}
.fbw-pos-right .fbw-launcher-label{ right:calc(100% + 12px); }
.fbw-pos-left .fbw-launcher-label{ left:calc(100% + 12px); }
.fbw-root.is-open .fbw-launcher-label{ display:none; }
@media(max-width:480px){ .fbw-launcher-label{ display:none; } }

/* pulse ring to draw attention (subtle, respects reduced motion) */
.fbw-launcher:before{
  content:"";
  position:absolute; inset:-6px;
  border-radius:50%;
  border:2px solid var(--fbw-accent);
  opacity:.55;
  animation:fbw-pulse 2.6s ease-out infinite;
}
.fbw-root.is-open .fbw-launcher:before{ display:none; }
@keyframes fbw-pulse{
  0%{ transform:scale(.9); opacity:.55; }
  70%{ transform:scale(1.28); opacity:0; }
  100%{ opacity:0; }
}
@media (prefers-reduced-motion:reduce){
  .fbw-launcher:before{ animation:none; }
  .fbw-launcher, .fbw-panel, .fbw-launcher-close{ transition:none; }
}

/* ---------- Panel ---------- */
.fbw-panel{
  position:absolute;
  bottom:calc(var(--fbw-launcher-size) + 16px);
  width:360px;
  max-width:calc(100vw - 32px);
  max-height:min(560px, 74vh);
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  opacity:0;
  transform:translateY(12px) scale(.98);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.fbw-pos-right .fbw-panel{ right:0; }
.fbw-pos-left .fbw-panel{ left:0; }
.fbw-root.is-open .fbw-panel{ opacity:1; transform:translateY(0) scale(1); pointer-events:auto; }

@media(max-width:480px){
  .fbw-panel{
    position:fixed; left:12px; right:12px; bottom:12px; width:auto; max-width:none;
    max-height:78vh;
  }
}

.fbw-header{
  display:flex; align-items:center; gap:10px;
  padding:14px 14px 14px 16px;
  background:var(--fbw-primary);
  color:#fff;
}
.fbw-header-avatar{
  width:40px; height:40px; border-radius:50%; overflow:hidden; flex:0 0 auto;
  background:rgba(255,255,255,.12);
}
.fbw-header-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.fbw-header-text{ display:flex; flex-direction:column; line-height:1.25; flex:1 1 auto; min-width:0; }
.fbw-header-text strong{ font-size:14.5px; }
.fbw-status{ font-size:11.5px; color:#c9d4e4; display:flex; align-items:center; gap:5px; }
.fbw-status i{ width:7px; height:7px; border-radius:50%; background:#3ddc84; display:inline-block; }
.fbw-close{
  background:transparent; border:0; color:#fff; opacity:.85; cursor:pointer;
  width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  flex:0 0 auto;
}
.fbw-close:hover{ opacity:1; background:rgba(255,255,255,.12); }

.fbw-tabs{ display:flex; border-bottom:1px solid #ece7df; background:#faf8f4; }
.fbw-tab{
  flex:1 1 0; padding:10px 8px; background:transparent; border:0; cursor:pointer;
  font-size:12.5px; font-weight:700; color:#5b6472; text-transform:uppercase; letter-spacing:.3px;
  border-bottom:2px solid transparent;
}
.fbw-tab.is-active{ color:var(--fbw-primary); border-bottom-color:var(--fbw-accent); }

.fbw-body{ padding:16px; overflow-y:auto; flex:1 1 auto; }
.fbw-pane{ display:none; }
.fbw-pane.is-active{ display:block; }

.fbw-bubble{
  background:#f4f1ea; border-radius:12px 12px 12px 4px;
  padding:12px 14px; font-size:13.5px; line-height:1.55; color:#26303f;
  margin-bottom:16px;
}
.fbw-bubble p{ margin:0 0 8px; }
.fbw-bubble p:last-child{ margin-bottom:0; }

.fbw-actions{ display:flex; flex-direction:column; gap:9px; }
.fbw-action{
  display:flex; align-items:center; gap:10px;
  padding:11px 14px; border-radius:9px;
  font-size:13.5px; font-weight:700; text-decoration:none;
  border:1px solid transparent;
  transition:filter .15s ease;
}
.fbw-action:hover{ filter:brightness(0.96); }
.fbw-action-icon{ display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.fbw-action-booking{ background:var(--fbw-primary); color:#fff; }
.fbw-action-whatsapp{ background:#25D366; color:#fff; }
.fbw-action-email{ background:#fff; color:var(--fbw-primary); border-color:var(--fbw-accent); }

.fbw-faq-list{ display:flex; flex-direction:column; gap:8px; }
.fbw-faq-item{ border:1px solid #ece7df; border-radius:9px; overflow:hidden; }
.fbw-faq-q{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:#fff; border:0; text-align:left; cursor:pointer;
  padding:11px 12px; font-size:13px; font-weight:700; color:var(--fbw-primary);
}
.fbw-chev{ flex:0 0 auto; transition:transform .18s ease; }
.fbw-faq-q[aria-expanded="true"] .fbw-chev{ transform:rotate(180deg); }
.fbw-faq-a{
  max-height:0; overflow:hidden; transition:max-height .22s ease;
  font-size:12.8px; line-height:1.55; color:#475160; background:#fcfbf8;
}
.fbw-faq-a p{ margin:0; padding:0 12px 12px; }
.fbw-faq-item.is-open .fbw-faq-a{ max-height:400px; }

.fbw-footer{
  padding:8px 14px; text-align:center; font-size:10px; color:#9aa2ad;
  border-top:1px solid #ece7df; background:#faf8f4;
}
