/* =========================================================
   Beaphoenix / Gaotus Chat UI — Corporate Dark (Premium)
   Accent: Orange (subtle) | Clean surfaces | Soft borders
   ========================================================= */

/* --- ROOT / RESET ÎN WIDGET --- */
#bp-ai-widget{
  position:fixed;
  bottom:20px;
  right:20px;
  z-index:999999;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* să nu mai calce tema peste noi */
#bp-ai-widget,
#bp-ai-widget *{
  box-sizing:border-box;
  font-family:inherit;
}

/* --- THEME TOKENS (corporate) --- */
#bp-ai-widget{
  --bp-bg:#07090d;
  --bp-surface:#0b0f16;
  --bp-surface2:#0f1622;
  --bp-card:rgba(255,255,255,.04);
  --bp-line:rgba(255,255,255,.10);
  --bp-line2:rgba(255,255,255,.14);
  --bp-text:#f3f6fb;
  --bp-muted:rgba(243,246,251,.70);

  /* ✅ accent (subtle, not neon) */
  --bp-accent:#ff7a00;
  --bp-accent2:#ff9a3d;

  --bp-radius:20px;
  --bp-radius2:14px;
  --bp-shadow:0 26px 80px rgba(0,0,0,.80);
  --bp-shadow2:0 16px 40px rgba(0,0,0,.60);
}

/* =========================================================
   FAB BUTTON (corporate, less “toy”)
   ========================================================= */
#bp-ai-fab{
  width:74px;
  height:74px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(120% 140% at 30% 25%, rgba(255,255,255,.14) 0, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(20,26,36,.95), rgba(10,12,18,.98));
  padding:3px;
  border-radius:999px;
  cursor:pointer;
  box-shadow:0 18px 60px rgba(0,0,0,.78);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
#bp-ai-fab:hover{
  transform:translateY(-2px);
  border-color:rgba(255,122,0,.45);
  box-shadow:0 22px 70px rgba(0,0,0,.82);
}
#bp-ai-fab img{
  width:66px;
  height:66px;
  border-radius:999px;
  display:block;
  object-fit:cover;
  background:#0b0c0e;
  border:1px solid rgba(255,255,255,.08);
}

/* optional pulse — corporate (soft) */
#bp-ai-fab{
  animation:bp-ai-pulse 3.0s infinite;
}

/* =========================================================
   PANEL
   ========================================================= */
#bp-ai-panel{
  width:392px;
  max-width:92vw;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,122,0,.10) 0, rgba(255,122,0,0) 42%),
    linear-gradient(180deg, var(--bp-surface), var(--bp-bg));
  color:var(--bp-text);
  border-radius:var(--bp-radius);
  box-shadow:var(--bp-shadow);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}

/* =========================================================
   HEADER (less orange, more corporate)
   ========================================================= */
#bp-ai-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255,122,0,.16) 0, rgba(255,122,0,0) 55%),
    linear-gradient(180deg, rgba(20,24,34,.92), rgba(12,14,20,.96));
  border-bottom:1px solid rgba(255,255,255,.08);
  color:var(--bp-text);
}

.bp-ai-head-left{
  display:flex;
  align-items:center;
  gap:10px;
}

#bp-ai-avatar{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:#0b0c0e;
  object-fit:cover;
}

.bp-ai-head-meta{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

#bp-ai-agent-name{
  font-weight:850;
  letter-spacing:.02em;
  font-size:14px;
}

.bp-ai-head-sub{
  font-size:11px;
  color:var(--bp-muted);
}

/* right actions */
.bp-ai-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

/* request button */
.bp-ai-offer-btn{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:var(--bp-text);
  padding:7px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  text-transform:uppercase;
  letter-spacing:.06em;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
.bp-ai-offer-btn:hover{
  background:rgba(255,122,0,.12);
  border-color:rgba(255,122,0,.45);
  transform:translateY(-1px);
}

#bp-ai-close{
  border:0;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:rgba(243,246,251,.85);
  padding:6px 8px;
  border-radius:10px;
  transition:background .15s ease, color .15s ease;
}
#bp-ai-close:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}

/* =========================================================
   BODY + MESSAGES
   ========================================================= */
#bp-ai-body{
  padding:10px 10px 12px;
}

#bp-ai-messages{
  height:292px;
  overflow:auto;
  padding:6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}
#bp-ai-messages::-webkit-scrollbar{ width:10px; }
#bp-ai-messages::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.14);
  border-radius:10px;
  border:3px solid transparent;
  background-clip: content-box;
}
#bp-ai-messages::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,.22);
  border:3px solid transparent;
  background-clip: content-box;
}

.bp-ai-msg{
  display:flex;
  margin:8px 0;
}
.bp-ai-msg.user{
  justify-content:flex-end;
}

.bp-ai-bub{
  max-width:86%;
  padding:10px 13px;
  border-radius:16px;
  line-height:1.45;
  font-size:13px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  color:var(--bp-text);
  box-shadow:0 10px 26px rgba(0,0,0,.35);
}

/* AI bubble */
.bp-ai-msg.ai .bp-ai-bub{
  border-top-left-radius:10px;
}

/* USER bubble (accent but corporate) */
.bp-ai-msg.user .bp-ai-bub{
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,122,0,.92), rgba(255,122,0,.74));
  border-color:rgba(255,122,0,.65);
  color:#111;
  font-weight:750;
  border-top-right-radius:10px;
}

/* Typing */
.bp-ai-typing{
  opacity:.9;
  letter-spacing:.12em;
}

/* =========================================================
   INPUT ROW
   ========================================================= */
#bp-ai-row{
  display:flex;
  gap:8px;
  margin-top:10px;
}

#bp-ai-input{
  flex:1;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--bp-text);
  font-size:13px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#bp-ai-input::placeholder{ color:rgba(243,246,251,.45); }
#bp-ai-input:focus{
  border-color:rgba(255,122,0,.55);
  box-shadow:0 0 0 3px rgba(255,122,0,.18);
  background:rgba(0,0,0,.26);
}

#bp-ai-send{
  padding:11px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255,255,255,.14) 0, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,122,0,.95), rgba(255,122,0,.70));
  color:#111;
  font-weight:900;
  cursor:pointer;
  text-transform:uppercase;
  letter-spacing:.06em;
  white-space:nowrap;
  transition:transform .15s ease, filter .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow:0 14px 30px rgba(0,0,0,.45);
}
#bp-ai-send:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
  border-color:rgba(255,122,0,.55);
}
#bp-ai-send:active{
  transform:translateY(0);
}

/* =========================================================
   OFFER / REQUEST MODAL
   ========================================================= */
#bp-ai-offer-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.68);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000000;
}

/* overlay click area (keeps your existing div) */
.bp-ai-offer-overlay{
  position:absolute;
  inset:0;
}

.bp-ai-offer-card{
  position:relative;
  width:min(520px,92vw);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,122,0,.10) 0, rgba(255,122,0,0) 55%),
    linear-gradient(180deg, rgba(18,22,32,.98), rgba(10,12,18,.98));
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:16px;
  color:var(--bp-text);
  box-shadow:var(--bp-shadow2);
}

.bp-ai-offer-title{
  font-weight:900;
  margin-bottom:10px;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:13px;
  color:rgba(243,246,251,.92);
}

#bp-ai-offer-modal input,
#bp-ai-offer-modal textarea{
  width:100%;
  margin:7px 0;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--bp-text);
  font-size:13px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#bp-ai-offer-modal input::placeholder,
#bp-ai-offer-modal textarea::placeholder{
  color:rgba(243,246,251,.45);
}
#bp-ai-offer-modal input:focus,
#bp-ai-offer-modal textarea:focus{
  border-color:rgba(255,122,0,.55);
  box-shadow:0 0 0 3px rgba(255,122,0,.18);
  background:rgba(0,0,0,.26);
}

.bp-ai-offer-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
}

#bp-ai-offer-send{
  flex:1;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255,255,255,.14) 0, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,122,0,.95), rgba(255,122,0,.72));
  color:#111;
  font-weight:900;
  cursor:pointer;
  text-transform:uppercase;
  letter-spacing:.06em;
  transition:transform .15s ease, filter .15s ease, border-color .15s ease;
}
#bp-ai-offer-send:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
  border-color:rgba(255,122,0,.55);
}

#bp-ai-offer-close{
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--bp-text);
  font-weight:850;
  cursor:pointer;
  text-transform:uppercase;
  letter-spacing:.06em;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
#bp-ai-offer-close:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
  transform:translateY(-1px);
}

/* =========================================================
   PULSE (soft, corporate)
   ========================================================= */
@keyframes bp-ai-pulse{
  0%{ box-shadow:0 0 0 0 rgba(255,122,0,.26), 0 18px 60px rgba(0,0,0,.78); }
  70%{ box-shadow:0 0 0 18px rgba(255,122,0,0), 0 18px 60px rgba(0,0,0,.78); }
  100%{ box-shadow:0 0 0 0 rgba(255,122,0,0), 0 18px 60px rgba(0,0,0,.78); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:480px){
  #bp-ai-panel{ width:92vw; }
  #bp-ai-messages{ height:240px; }
  #bp-ai-fab{ width:66px; height:66px; }
  #bp-ai-fab img{ width:58px; height:58px; }
}
