/* ═══════════════════════════════════════
   FLOATING COMPANION ORB
═══════════════════════════════════════ */
.orb-float{
  position:fixed;
  bottom:calc(var(--nav-h) + 16px + var(--safe-bottom));
  right:20px;
  z-index:300;
  cursor:pointer;
}
@media(min-width:768px){
  .orb-float{bottom:24px;right:24px;}
}

.orb-btn{
  width:52px;height:52px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,rgba(240,235,225,.12),rgba(196,61,26,.08) 50%,rgba(9,8,7,.9));
  border:1px solid var(--border2);
  display:flex;align-items:center;justify-content:center;
  font-size:22px;
  animation:orb-breathe 4s ease-in-out infinite;
  box-shadow:0 4px 20px rgba(196,61,26,.2);
  transition:.2s;
}
.orb-btn:hover{transform:scale(1.06);}
@keyframes orb-breathe{0%,100%{box-shadow:0 4px 20px rgba(196,61,26,.2)}50%{box-shadow:0 4px 32px rgba(196,61,26,.4)}}

.orb-badge{
  position:absolute;top:-2px;right:-2px;
  width:14px;height:14px;border-radius:50%;
  background:var(--gold);border:2px solid var(--bg);
  animation:badge-pulse 0.8s infinite;
}
@keyframes badge-pulse{0%,40%{opacity:1;transform:scale(1)}20%{opacity:.3;transform:scale(.7)}}

/* COMPANION PANEL */
.comp-panel{
  position:fixed;
  bottom:calc(var(--nav-h) + 80px + var(--safe-bottom));
  right:20px;
  width:min(340px,calc(100vw - 40px));
  height:460px;
  max-height:calc(100dvh - var(--nav-h) - 110px - var(--safe-bottom));
  background:var(--bg2);border:1px solid var(--border2);
  border-radius:20px;
  box-shadow:0 8px 40px rgba(0,0,0,.4);
  display:none;flex-direction:column;
  overflow:hidden;z-index:299;
  animation:panel-up .3s ease;
}
.comp-panel.open{display:flex;}
@keyframes panel-up{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:768px){.comp-panel{bottom:90px;right:24px;width:360px;height:500px;max-height:calc(100dvh - 120px);}}

.comp-panel-hdr{
  padding:16px 18px 12px;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:10px;
  flex-shrink:0;
}
.cp-orb{
  width:36px;height:36px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,rgba(240,235,225,.1),rgba(196,61,26,.06));
  border:1px solid var(--border2);
  display:flex;align-items:center;justify-content:center;font-size:16px;
  animation:orb-breathe 4s ease-in-out infinite;
}
.cp-info{flex:1;}
.cp-name{font-size:13px;font-weight:600;color:var(--text);}
.cp-status{font-size:10px;color:var(--text3);}
.cp-forming{font-size:10px;color:var(--gold);letter-spacing:.08em;}
.cp-close{
  width:28px;height:28px;border-radius:50%;
  background:var(--bg3);border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;color:var(--text2);transition:.2s;
}
.cp-close:hover{background:var(--border2);}

.cp-chat{
  flex:1;min-height:0;padding:12px 16px;
  display:flex;flex-direction:column;gap:8px;
  overflow-y:auto;
  scrollbar-width:none;
}
.cp-chat::-webkit-scrollbar{display:none;}

.bub{max-width:88%;padding:10px 12px;border-radius:12px;font-size:13px;line-height:1.5;}
.bub.ai{background:var(--bg3);border:1px solid var(--border);align-self:flex-start;border-bottom-left-radius:3px;color:var(--text2);}
.bub.usr{background:rgba(196,61,26,.12);border:1px solid rgba(196,61,26,.18);align-self:flex-end;border-bottom-right-radius:3px;color:var(--text);}

.cp-in-row{
  padding:10px 14px;border-top:1px solid var(--border);
  display:flex;gap:8px;flex-shrink:0;
}
.cp-in{
  flex:1;padding:9px 12px;background:var(--input);
  border:1px solid var(--border);border-radius:20px;
  color:var(--text);font-family:'Outfit',sans-serif;font-size:13px;outline:none;transition:.2s;
}
.cp-in::placeholder{color:var(--text3);}
.cp-in:focus{border-color:rgba(196,61,26,.35);}
.cp-send{
  width:34px;height:34px;border-radius:50%;
  background:var(--accent);border:none;color:#fff;
  font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s;
}
.cp-send:hover{background:var(--accent2);}
.cp-send:disabled{background:var(--bg3);cursor:not-allowed;}

/* Fullscreen button in panel header */
.cp-fs-btn{
  width:28px;height:28px;border-radius:50%;
  background:var(--bg3);border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;color:var(--text2);transition:.2s;
  margin-right:4px;
}
.cp-fs-btn:hover{background:var(--border2);}

/* Fullscreen panel state */
/* ── LUMI FULLSCREEN — now a proper .screen inside .main, no position:fixed needed ── */

.lumi-fs-hdr{
  padding:calc(var(--safe-top) + 14px) 24px 14px;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;
  background:var(--bg);
}
/* Mobile top bar is managed via JS in switchTab() — hidden for lumi/payment screens */
/* Also push lumi-fs-hdr safe area down properly on notched phones */
@media(max-width:767px){
  .lumi-fs-hdr{padding:max(calc(var(--safe-top) + 12px), 16px) 16px 12px;}
}
.lumi-fs-body{
  flex:1;min-height:0;
  display:flex;flex-direction:column;
  max-width:760px;width:100%;
  margin:0 auto;
  padding:0 16px;
}
.comp-panel.fullscreen{display:none !important;} /* disabled — use lumi-fs-ov instead */
.comp-panel.fullscreen .cp-chat{
  max-height:none;
  flex:1;
}
.lumi-thinking{display:flex;gap:4px;align-items:center;padding:10px 12px;background:var(--bg3);border:1px solid var(--border);border-radius:12px;border-bottom-left-radius:3px;align-self:flex-start;}
.lumi-dot{width:5px;height:5px;border-radius:50%;background:var(--text3);animation:lumi-bounce 1.2s ease-in-out infinite;}
.lumi-dot:nth-child(2){animation-delay:.2s;}
.lumi-dot:nth-child(3){animation-delay:.4s;}
@keyframes lumi-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}
.cp-suggestions{padding:6px 14px 8px;display:flex;flex-direction:column;gap:5px;flex-shrink:0;}
.cp-sugg{font-size:11px;color:var(--text3);background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:7px 11px;cursor:pointer;transition:.15s;line-height:1.4;text-align:left;}
.cp-sugg:hover{border-color:rgba(196,61,26,.3);color:var(--text2);}

