#bpa-chatbot, #bpa-chatbot * { box-sizing: border-box; }
#bpa-chatbot {
  --bpa-dark:#171a1d;
  --bpa-accent:#d8a51d;
  --bpa-accent-dark:#b8870f;
  --bpa-light:#f5f6f7;
  --bpa-border:#e5e7ea;
  --bpa-whatsapp:#25D366;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: Arial, Helvetica, sans-serif;
}
.bpa-dock {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.bpa-screen-phone {
  position:fixed;
  left:22px;
  bottom:22px;
  width:52px;
  height:52px;
  min-height:52px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--bpa-accent);
  color:var(--bpa-dark);
  text-decoration:none;
  box-shadow:0 12px 34px rgba(0,0,0,.22);
  transition:.18s ease;
}
.bpa-screen-phone:hover { transform:translateY(-1px); background:var(--bpa-accent-dark); color:#fff; }
.bpa-screen-phone .bpa-icon-svg { width:23px; height:23px; }
.bpa-float-link {
  width:48px;
  height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  text-decoration:none;
  color:#fff;
  box-shadow:0 12px 34px rgba(0,0,0,.20);
  transition:.18s ease;
}
.bpa-float-link:hover { transform: translateY(-1px); }
.bpa-float-whatsapp { background:var(--bpa-whatsapp); }
.bpa-float-whatsapp span { display:none; }
.bpa-open .bpa-float-whatsapp { opacity:0; visibility:hidden; pointer-events:none; }
.bpa-float-phone { background:var(--bpa-dark); }
.bpa-icon-svg { width:22px; height:22px; display:block; fill:currentColor; }
.bpa-launcher {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:52px;
  padding:0 18px;
  border:0;
  border-radius:999px;
  background:var(--bpa-accent);
  color:var(--bpa-dark);
  box-shadow:0 12px 34px rgba(0,0,0,.24);
  cursor:pointer;
  font-weight:600;
}
.bpa-launcher-text { font-weight:600; }
.bpa-launcher:hover { transform: translateY(-1px); }
.bpa-launcher-icon {
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(23,26,29,.10);
  color:var(--bpa-dark);
}
.bpa-panel {
  position:absolute;
  right:0;
  bottom:66px;
  width:min(390px, calc(100vw - 28px));
  height:min(670px, calc(100vh - 120px));
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 22px 70px rgba(0,0,0,.28);
  border:1px solid rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
}
.bpa-panel[hidden] { display:none !important; }
.bpa-header {
  min-height:84px;
  padding:20px 18px 16px;
  background:var(--bpa-dark);
  color:#fff;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.bpa-header-title { padding-top:2px; }
.bpa-header strong { display:block; font-size:17px; line-height:1.2; margin:0; }
.bpa-header small { display:block; margin-top:6px; opacity:.78; font-size:12px; line-height:1.25; }
.bpa-close { width:38px; height:38px; border:0; border-radius:50%; background:rgba(255,255,255,.10); color:#fff; font-size:26px; line-height:1; cursor:pointer; flex:0 0 auto; }
.bpa-messages {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:16px;
  background:var(--bpa-light);
}
.bpa-message { width:fit-content; max-width:88%; padding:11px 13px; margin:0 0 10px; border-radius:14px; font-size:13.5px; line-height:1.48; word-break:break-word; }
.bpa-bot { background:#fff; color:#202326; border:1px solid var(--bpa-border); border-top-left-radius:5px; }
.bpa-user { margin-left:auto; background:var(--bpa-dark); color:#fff; border-top-right-radius:5px; }
.bpa-message a { color:#a66f00; text-decoration:underline; }
.bpa-quick-actions {
  min-height:64px;
  max-height:120px;
  overflow:auto;
  padding:9px 11px;
  border-top:1px solid #eceef0;
  background:#fff;
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-content:flex-start;
}
.bpa-chip, .bpa-shortcut {
  appearance:none;
  border:1px solid #d8dadd;
  background:#fff;
  color:var(--bpa-dark);
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  line-height:1.1;
  text-decoration:none;
  cursor:pointer;
  transition:.18s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.bpa-chip:hover, .bpa-shortcut:hover { background:var(--bpa-dark); color:#fff; border-color:var(--bpa-dark); }
.bpa-shortcuts {
  padding:8px 10px;
  border-top:1px solid #eceef0;
  background:#fbfbfc;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.bpa-shortcut-primary { border-color:rgba(216,165,29,.55); background:rgba(216,165,29,.10); }
.bpa-shortcut-primary:hover { background:var(--bpa-accent); color:var(--bpa-dark); border-color:var(--bpa-accent); }
.bpa-input-row { padding:8px; border-top:1px solid #eceef0; display:flex; gap:8px; background:#fff; }
.bpa-input { flex:1; min-width:0; border:1px solid #d8dadd !important; border-radius:10px !important; padding:0 12px !important; margin:0 !important; height:42px !important; font-size:13px !important; box-shadow:none !important; background:#fff !important; color:var(--bpa-dark) !important; }
.bpa-send { width:82px; border:0; border-radius:10px; background:var(--bpa-accent); color:var(--bpa-dark); font-weight:600; cursor:pointer; }
.bpa-send:hover { background:var(--bpa-accent-dark); color:#fff; }
.bpa-result { padding:8px 0; border-bottom:1px solid #eceef0; }
.bpa-result:last-child { border-bottom:0; }
.bpa-result strong { display:block; margin-bottom:3px; }
.bpa-result span { display:block; color:#5d6369; font-size:12px; }
.bpa-result-link { display:inline-block; margin-top:6px; font-size:12px; font-weight:600; }

@media (max-width: 600px) {
  #bpa-chatbot { right:12px; bottom:12px; left:auto; }
  .bpa-dock { flex-direction:column; align-items:flex-end; gap:9px; }
  .bpa-float-link { width:46px; height:46px; }
  .bpa-screen-phone {
    left:12px;
    bottom:12px;
    width:46px;
    height:46px;
    min-height:46px;
    padding:0;
  }
  .bpa-launcher { min-width:52px; padding:0 14px; }
  .bpa-launcher-text { display:none; }
  .bpa-panel { position:fixed; left:8px; right:8px; top:8px; bottom:8px; width:auto; height:auto; border-radius:16px; }
  .bpa-header { min-height:88px; padding:20px 16px 16px; }
  .bpa-quick-actions { max-height:132px; }
  .bpa-shortcuts { justify-content:flex-start; }
}
