/* ═══════════════════════════════════════════════════════════════════════════
   BAECO 2026 — B1: CONVERSAȚIA CU ANDER & ERWIN (ordin owner v11 „GO FINAL")
   v12 (ordin owner UX, 25.09): ASISTENT PLUTITOR NEBLOCANT —
     · Ander & Erwin pornesc MINIMIZAȚI într-o bară discretă plutitoare jos
       (avatar + ANDER · Te ajut să alegi + punct discret de mesaj nou);
     · panoul = fereastră COMPACTĂ (desktop ~380px / ~62vh, mobil 52vh),
       mutabilă de header (poziția rămâne memorată), redimensionabilă din
       colț; − = minimizare în bară; ✕ = închidere (mod clasic);
     · configuratorul 3D rămâne vedeta paginii — nimic nu-l acoperi permanent.
   Strat ADITIV — folosește EXCLUSIV token-ele existente ale site-ului
   (--ch --cr --oak --oakl --fr --wh, --serif --body). Identitatea BAECO
   rămâne neatinsă. Conținutul mesajelor reutilizează clasele .ast-* din
   baeco-premium.css (aceeași familie vizuală ca S9). Portretele
   consultantilor: fotografii realiste premium (consultant-ander/erwin.jpg),
   cu fallback pe monogramă dacă imaginea nu se încarcă.
   ═══════════════════════════════════════════════════════════════════════════ */

#bc-root, #bc-root * { box-sizing: border-box; }

/* ── 1. (eliminat 28.09.2026 — selectorul „MOD CONFIGURATOR" a fost înlocuit de
   identitatea premium statică .cfg-hero; Ander & Erwin rămân asistent în fundal) ── */

/* ── 2. BARA PLUTITOARE (starea de repaus — Ander & Erwin minimizați, v12) ── */
#bc-bar {
  position: fixed; left: 22px; bottom: 26px; z-index: 335;
  display: flex; align-items: center; gap: 10px;
  max-width: min(420px, calc(100vw - 104px));
  min-height: 50px; padding: 7px 16px 7px 8px;
  border-radius: 999px; cursor: pointer;
  background: rgba(16,16,14,.96);
  border: 1px solid rgba(184,135,58,.5);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 6px rgba(28,46,26,.18);
  backdrop-filter: blur(10px);
  font-family: var(--body); text-align: left;
  transition: transform .25s cubic-bezier(.23,1,.32,1), box-shadow .25s, border-color .25s;
}
#bc-bar:hover { transform: translateY(-2px); border-color: rgba(184,135,58,.8); box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 0 8px rgba(28,46,26,.24); }
#bc-bar:active { transform: scale(.97); }
#bc-bar.bc-hide { display: none; }
#bc-bar .bc-av { width: 36px; height: 36px; }
.bc-bar-txt {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .78rem; color: rgba(245,240,232,.62);
}
.bc-bar-txt b { color: var(--cr); font-weight: 700; letter-spacing: .09em; font-size: .7rem; }
.bc-bar-sep { opacity: .4; margin: 0 5px; }
.bc-bar-prev { color: rgba(245,240,232,.62); }
/* indicatorul discret de mesaj nou (ordin v12 pct. 1) */
.bc-dot {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: #d9a94e; opacity: 0; transform: scale(.4);
  transition: opacity .25s, transform .25s;
}
.bc-dot.bc-on { opacity: 1; transform: scale(1); animation: bc-dot 2.2s ease-out infinite; }
@keyframes bc-dot {
  0% { box-shadow: 0 0 0 0 rgba(217,169,78,.55); }
  70% { box-shadow: 0 0 0 8px rgba(217,169,78,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,169,78,0); }
}

/* ── 3. SALUTUL DE INTRARE (§1 — Ander întâmpină, apoi așteaptă) ── */
#bc-toast {
  position: fixed; left: 22px; bottom: 96px; z-index: 345;
  width: min(360px, calc(100vw - 32px));
  background: rgba(16,16,14,.97); border: 1px solid rgba(184,135,58,.45);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.55);
  backdrop-filter: blur(10px); padding: 16px 16px 14px;
  animation: bc-in .45s cubic-bezier(.23,1,.32,1);
}
#bc-toast.bc-hide { display: none; }
@keyframes bc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bc-x {
  appearance: none; background: none; border: 1px solid rgba(245,240,232,.14);
  color: rgba(245,240,232,.45); border-radius: 6px; width: 30px; height: 30px;
  cursor: pointer; font-size: .8rem; line-height: 1; flex: none;
  transition: color .2s, border-color .2s;
}
.bc-x:hover { color: var(--cr); border-color: rgba(184,135,58,.5); }
.bc-toast-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bc-toast-head .bc-x { margin-left: auto; }
.bc-id b {
  display: block; font-family: var(--body); font-size: .74rem; font-weight: 700;
  letter-spacing: .18em; color: var(--cr);
}
.bc-id small { display: block; font-size: .64rem; color: rgba(245,240,232,.5); margin-top: 2px; }
.bc-toast-msg { font-family: var(--serif); font-size: .92rem; line-height: 1.6; color: rgba(245,240,232,.88); margin: 0 0 12px; }
.bc-toast-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 4. AVATARE — portrete realiste premium (v12), fallback monogramă ── */
.bc-av {
  width: 36px; height: 36px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #223528, var(--fr));
  border: 1.5px solid rgba(184,135,58,.7);
}
.bc-av img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%; border-radius: 50%; display: block;
}
.bc-av .bc-av-m { display: none; }
.bc-av.bc-av-fb img { display: none; }
.bc-av.bc-av-fb .bc-av-m {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--oakl);
}
.bc-av.e { border-color: rgba(143,191,138,.65); }
.bc-av.e.bc-av-fb .bc-av-m { color: #a9d9a3; }
.bc-av.sm { width: 28px; height: 28px; }
.bc-av.sm.bc-av-fb .bc-av-m { font-size: .84rem; }

/* ── 5. PANOUL COMPACT PLUTITOR (v12: ~380px / ~62vh, mutabil, redimensionabil) ── */
#bc-panel {
  position: fixed; z-index: 340;
  display: none; flex-direction: column; overflow: hidden;
  background: rgba(16,16,14,.97); border: 1px solid rgba(184,135,58,.45);
  border-radius: 12px; box-shadow: 0 22px 60px rgba(0,0,0,.6);
  backdrop-filter: blur(12px);
}
#bc-panel.bc-open { display: flex; animation: bc-in .3s cubic-bezier(.23,1,.32,1); }
/* geometria (left/top/width/height) e setată de JS: implicit colț dreapta-jos,
   apoi poziția/mărimea mutate de utilizator (memorate în localStorage) */

/* headerul = zonă de tragere (desktop); dublu-click = poziția implicită */
.bc-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 11px;
  border-bottom: 1px solid rgba(184,135,58,.3);
  background: linear-gradient(180deg, rgba(28,46,26,.5), rgba(16,16,14,0));
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.bc-head.bc-grabbing { cursor: grabbing; }
.bc-headbtns { margin-left: auto; display: flex; gap: 6px; }
.bc-headbtn { font-size: .92rem; }

/* mânerul de tragere pe mobil (trage în jos = minimizare) */
.bc-grab { display: none; }

/* gripul de redimensionare (desktop) — colț dreapta-jos */
.bc-rz { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; z-index: 2; }
.bc-rz::after {
  content: ''; position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px;
  border-right: 2px solid rgba(184,135,58,.55); border-bottom: 2px solid rgba(184,135,58,.55);
  border-radius: 0 0 3px 0;
}
@media (max-width: 860px) { .bc-rz { display: none; } }

#bc-msgs {
  flex: 1; overflow-y: auto; padding: 16px 14px 6px;
  scrollbar-width: thin; scrollbar-color: rgba(184,135,58,.35) transparent;
}
#bc-msgs::-webkit-scrollbar { width: 5px; }
#bc-msgs::-webkit-scrollbar-thumb { background: rgba(184,135,58,.35); border-radius: 3px; }

.bc-m { display: flex; gap: 9px; margin-bottom: 14px; animation: bc-m-in .3s ease; }
@keyframes bc-m-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bc-m .bc-av { margin-top: 2px; }
.bc-mb { min-width: 0; max-width: calc(100% - 48px); }
.bc-mwho {
  font-family: var(--body); font-size: .58rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--oak); margin-bottom: 5px;
}
.bc-m.erwin .bc-mwho { color: #a9d9a3; }
.bc-mc {
  background: rgba(245,240,232,.045); border: 1px solid rgba(245,240,232,.1);
  border-left: 2px solid var(--oak); border-radius: 3px 10px 10px 3px;
  padding: 12px 14px; font-size: .8rem; color: rgba(245,240,232,.85);
  line-height: 1.65; overflow-wrap: break-word;
}
.bc-m.erwin .bc-mc { border-left-color: rgba(143,191,138,.7); background: rgba(143,191,138,.05); }
.bc-mc b { color: var(--cr); }
.bc-mc .ast-price { margin-top: 10px; }
.bc-m.client { justify-content: flex-end; }
.bc-m.client .bc-mc {
  background: rgba(184,135,58,.13); border: 1px solid rgba(184,135,58,.4);
  border-left: 1px solid rgba(184,135,58,.4); border-radius: 10px 3px 3px 10px;
  color: var(--cr);
}
.bc-m.note { justify-content: center; }
.bc-m.note .bc-mc {
  background: none; border: none; border-left: none; border-radius: 0;
  color: rgba(245,240,232,.5); font-family: var(--serif); font-style: italic;
  font-size: .74rem; text-align: center; padding: 2px 8px;
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.bc-m.note .bc-mc::before, .bc-m.note .bc-mc::after {
  content: ''; height: 1px; background: rgba(184,135,58,.25); flex: 1; min-width: 12px;
}

/* răspunsuri rapide contextuale (butoane secundare §gap5) */
#bc-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 14px 10px; }
.bc-q {
  appearance: none; cursor: pointer; background: rgba(6,6,5,.4);
  border: 1px solid rgba(245,240,232,.16); color: rgba(245,240,232,.75);
  font-family: var(--body); font-size: .7rem; letter-spacing: .02em;
  padding: 9px 13px; border-radius: 999px; min-height: 40px;
  transition: border-color .2s, color .2s, background .2s, transform .15s;
}
.bc-q:hover { border-color: rgba(184,135,58,.6); color: var(--cr); background: rgba(184,135,58,.09); }
.bc-q:active { transform: scale(.96); }

/* câmpul de scriere */
#bc-form { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid rgba(245,240,232,.07); }
#bc-in {
  flex: 1; min-width: 0; background: rgba(6,6,5,.55);
  border: 1px solid rgba(184,135,58,.3); border-radius: 8px;
  color: var(--cr); font-family: var(--body); font-size: .84rem;
  padding: 12px 14px; outline: none; transition: border-color .25s;
}
#bc-in::placeholder { color: rgba(245,240,232,.35); }
#bc-in:focus { border-color: var(--oakl); }
.bc-send {
  appearance: none; flex: none; width: 46px; border: none; border-radius: 8px;
  background: var(--oak); color: var(--ch); cursor: pointer; font-size: 1rem;
  transition: background .25s, transform .15s; min-height: 46px;
}
.bc-send:hover { background: var(--oakl); }
.bc-send:active { transform: scale(.94); }

/* ── 6. FOCUS / MIȘCARE REDUSĂ ── */
#bc-bar:focus-visible, .bc-x:focus-visible,
.bc-q:focus-visible, .bc-send:focus-visible, #bc-in:focus-visible {
  outline: 2px solid var(--oakl); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #bc-panel, #bc-toast, .bc-m { animation: none; }
  .bc-dot { animation: none; }
  #bc-bar, .bc-q, .bc-send { transition: none; }
}

/* ── 7. MOBIL (≤860px): bară compactă jos + coală de 52vh, 3D accesibil ── */
@media (max-width: 860px) {
  #bc-bar { left: 12px; bottom: 16px; max-width: calc(100vw - 92px); min-height: 48px; padding: 6px 14px 6px 7px; }
  #bc-toast { left: 12px; right: auto; bottom: 92px; }
  #bc-panel {
    left: 0 !important; right: 0; top: auto !important; bottom: 0;
    width: 100% !important; height: 52vh !important; max-height: 62vh;
    border-radius: 14px 14px 0 0; border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  #bc-panel.bc-open { animation: bc-in-m .35s cubic-bezier(.23,1,.32,1); }
  @keyframes bc-in-m { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  .bc-grab {
    display: flex; align-items: center; justify-content: center;
    height: 26px; padding-top: 8px; cursor: grab; touch-action: none;
    user-select: none; -webkit-user-select: none;
  }
  .bc-grab-pill { width: 44px; height: 5px; border-radius: 3px; background: rgba(245,240,232,.28); }
  .bc-head { padding-top: 8px; cursor: default; }
  #bc-msgs { padding: 14px 12px 4px; }
  #bc-quick { padding: 6px 12px 8px; }
  .bc-q { min-height: 44px; padding: 10px 14px; }
  #bc-form { padding: 8px 12px 12px; }
  .bc-mb { max-width: calc(100% - 42px); }
  /* când bara CONFIGURAȚIA MEA e vizibilă pe mobil, bara/toastul se ridică deasupra ei */
  body.bc-bsb-on #bc-bar { bottom: 150px; }
  body.bc-bsb-on #bc-toast { bottom: 212px; }
}
