/* ================================================
   RADIANCE AI BOT — Sanwar Gill Avatar
   radiance-bot.css
   ================================================ */
:root{--rb-primary:#0b8793;--rb-dark:#073b4c;--rb-gold:#f4c430;--rb-bg:#0d1f2d;--rb-surface:#112635;--rb-text:#e8f4f8;--rb-muted:#7fa9b8;--rb-radius:18px;--rb-z:9990}

/* ---- Floating trigger button ---- */
#rbot-trigger{position:fixed;bottom:92px;right:20px;left:auto;width:62px;height:62px;border-radius:50%;background:linear-gradient(135deg,var(--rb-primary),var(--rb-dark));border:none;cursor:pointer;z-index:var(--rb-z);box-shadow:0 8px 32px rgba(11,135,147,.5);display:flex;align-items:center;justify-content:center;transition:transform .2s ease,box-shadow .2s ease;padding:0}
#rbot-trigger:hover{transform:scale(1.08);box-shadow:0 12px 40px rgba(11,135,147,.7)}
#rbot-trigger::after{content:'';position:absolute;inset:-7px;border-radius:50%;border:2px solid rgba(11,135,147,.4);animation:rbot-pulse 2.2s ease-in-out infinite}
@keyframes rbot-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.18);opacity:0}}
.rbot-trigger-img{width:50px;height:50px;border-radius:50%;overflow:hidden;border:2px solid rgba(244,196,48,.5);display:flex;align-items:center;justify-content:center}
.rbot-avatar-photo{width:100%;height:100%;object-fit:cover;object-position:center top;border-radius:50%}
#rbot-notif{position:absolute;top:1px;right:1px;width:16px;height:16px;background:var(--rb-gold);border-radius:50%;border:2px solid var(--rb-dark);animation:rbot-bounce .9s ease-in-out infinite alternate;display:flex;align-items:center;justify-content:center;font-size:9px;color:#1a0800;font-weight:700}
@keyframes rbot-bounce{from{transform:scale(1)}to{transform:scale(1.3)}}

/* ---- Chat panel ---- */
#rbot-panel{position:fixed;bottom:168px;right:20px;width:360px;max-height:570px;background:var(--rb-bg);border-radius:var(--rb-radius);border:1px solid rgba(11,135,147,.3);box-shadow:0 24px 80px rgba(0,0,0,.65),0 0 0 1px rgba(11,135,147,.08);z-index:var(--rb-z);display:flex;flex-direction:column;overflow:hidden;transform:translateY(20px) scale(.95);opacity:0;pointer-events:none;transition:transform .32s cubic-bezier(.34,1.56,.64,1),opacity .22s ease}
#rbot-panel.open{transform:translateY(0) scale(1);opacity:1;pointer-events:all}

/* ---- Header ---- */
.rbot-header{background:linear-gradient(135deg,#0b8793 0%,#073b4c 100%);padding:13px 15px;display:flex;align-items:center;gap:11px;flex-shrink:0}
.rbot-avatar-wrap{position:relative;flex-shrink:0}
.rbot-avatar{width:48px;height:48px;border-radius:50%;border:2px solid rgba(244,196,48,.55);overflow:hidden;background:#1a3a5c}
.rbot-avatar img,.rbot-avatar svg{width:100%;height:100%;object-fit:cover}
.rbot-online-dot{position:absolute;bottom:1px;right:1px;width:11px;height:11px;background:#2ecc71;border-radius:50%;border:2px solid #0b8793}
.rbot-header-info{flex:1;min-width:0}
.rbot-name{font-family:'Sora',sans-serif;font-size:14px;font-weight:700;color:#fff;letter-spacing:.02em}
.rbot-role{font-size:11px;color:rgba(255,255,255,.68);margin-top:1px}
.rbot-hbtns{display:flex;gap:7px}
.rbot-hbtn{background:rgba(255,255,255,.12);border:none;color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:background .2s;flex-shrink:0}
.rbot-hbtn:hover{background:rgba(255,255,255,.26)}

/* ---- Messages ---- */
.rbot-msgs{flex:1;overflow-y:auto;padding:14px 13px;display:flex;flex-direction:column;gap:9px;scroll-behavior:smooth}
.rbot-msgs::-webkit-scrollbar{width:3px}
.rbot-msgs::-webkit-scrollbar-track{background:transparent}
.rbot-msgs::-webkit-scrollbar-thumb{background:rgba(11,135,147,.35);border-radius:2px}
.rbot-msg{max-width:90%;animation:rbot-up .22s ease;font-size:13.5px;line-height:1.55}
@keyframes rbot-up{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.rbot-msg.bot{align-self:flex-start}
.rbot-msg.user{align-self:flex-end}
.rbot-bubble{padding:9px 14px;border-radius:14px;display:inline-block;max-width:100%}
.rbot-msg.bot .rbot-bubble{background:var(--rb-surface);color:var(--rb-text);border-bottom-left-radius:4px;border:1px solid rgba(11,135,147,.18)}
.rbot-msg.user .rbot-bubble{background:linear-gradient(135deg,#0b8793,#0a6e79);color:#fff;border-bottom-right-radius:4px}

/* Typing dots */
.rbot-typing .rbot-bubble{padding:11px 16px}
.rbot-dots{display:flex;gap:5px;align-items:center}
.rbot-dots span{width:7px;height:7px;background:var(--rb-primary);border-radius:50%;animation:rbot-dot 1.2s ease-in-out infinite}
.rbot-dots span:nth-child(2){animation-delay:.2s}
.rbot-dots span:nth-child(3){animation-delay:.4s}
@keyframes rbot-dot{0%,80%,100%{transform:scale(.7);opacity:.4}40%{transform:scale(1);opacity:1}}

/* Calculator card */
.rbot-calc-card{background:linear-gradient(135deg,rgba(11,135,147,.14),rgba(7,59,76,.28));border:1px solid rgba(11,135,147,.4);border-radius:11px;padding:11px 13px;margin-top:5px}
.rbot-calc-icon{font-size:20px;margin-bottom:4px}
.rbot-calc-title{font-size:12px;font-weight:700;color:var(--rb-primary);text-transform:uppercase;letter-spacing:.07em;margin-bottom:3px}
.rbot-calc-desc{font-size:12px;color:var(--rb-muted);margin-bottom:9px;line-height:1.4}
.rbot-calc-open{display:inline-flex;align-items:center;gap:5px;background:var(--rb-primary);color:#fff;font-size:12px;font-weight:600;padding:6px 14px;border-radius:100px;border:none;cursor:pointer;text-decoration:none;transition:background .2s}
.rbot-calc-open:hover{background:#0fa0ad;color:#fff}

/* Product card */
.rbot-prod-card{background:rgba(11,135,147,.07);border:1px solid rgba(11,135,147,.22);border-radius:9px;padding:9px 12px;margin-top:5px;cursor:pointer;transition:background .2s}
.rbot-prod-card:hover{background:rgba(11,135,147,.15)}
.rbot-prod-name{font-size:13px;font-weight:700;color:var(--rb-text)}
.rbot-prod-tech{font-size:11px;color:var(--rb-primary);margin-top:1px}

/* Quick chips */
.rbot-chips{padding:7px 13px;display:flex;flex-wrap:wrap;gap:6px;flex-shrink:0;border-top:1px solid rgba(11,135,147,.1)}
.rbot-chip{background:rgba(11,135,147,.1);border:1px solid rgba(11,135,147,.28);color:var(--rb-text);font-size:12px;padding:5px 12px;border-radius:100px;cursor:pointer;transition:background .2s,border-color .2s;white-space:nowrap;font-family:inherit}
.rbot-chip:hover{background:rgba(11,135,147,.28);border-color:var(--rb-primary)}

/* Input row */
.rbot-input-row{padding:9px 13px 13px;display:flex;gap:8px;align-items:center;flex-shrink:0;border-top:1px solid rgba(11,135,147,.1)}
.rbot-input{flex:1;background:var(--rb-surface);border:1px solid rgba(11,135,147,.25);border-radius:100px;color:var(--rb-text);font-size:13px;padding:9px 16px;outline:none;transition:border-color .2s;font-family:inherit}
.rbot-input::placeholder{color:var(--rb-muted)}
.rbot-input:focus{border-color:var(--rb-primary)}
.rbot-send{width:38px;height:38px;border-radius:50%;background:var(--rb-primary);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;flex-shrink:0;transition:background .2s,transform .1s}
.rbot-send:hover{background:#0fa0ad}
.rbot-send:active{transform:scale(.9)}

/* ---- Teaser bubble (silent visitor) ---- */
#rbot-teaser{position:fixed;bottom:168px;right:20px;background:var(--rb-bg);border:1px solid rgba(11,135,147,.38);border-radius:14px;padding:14px 16px;max-width:240px;z-index:var(--rb-z);box-shadow:0 8px 32px rgba(0,0,0,.5);animation:rbot-up .4s ease}
#rbot-teaser p{color:var(--rb-text);font-size:13px;line-height:1.5;margin:0 0 10px}
.rbot-teaser-close{float:right;background:none;border:none;color:var(--rb-muted);cursor:pointer;font-size:14px;padding:0;margin-top:-2px}
.rbot-tbtns{display:flex;flex-wrap:wrap;gap:6px}
.rbot-tbtn{background:rgba(11,135,147,.18);border:1px solid rgba(11,135,147,.38);color:var(--rb-text);font-size:12px;padding:5px 12px;border-radius:100px;cursor:pointer;transition:background .2s;font-family:inherit}
.rbot-tbtn:hover{background:var(--rb-primary);color:#fff;border-color:var(--rb-primary)}

/* ---- Sound wave (speaking indicator) ---- */
.rbot-speaking{display:inline-flex;gap:3px;align-items:flex-end;height:16px;margin-left:8px;vertical-align:middle}
.rbot-speaking span{width:3px;background:var(--rb-gold);border-radius:2px;animation:rbot-wave 0.8s ease-in-out infinite}
.rbot-speaking span:nth-child(1){height:6px;animation-delay:0s}
.rbot-speaking span:nth-child(2){height:12px;animation-delay:.1s}
.rbot-speaking span:nth-child(3){height:9px;animation-delay:.2s}
.rbot-speaking span:nth-child(4){height:14px;animation-delay:.3s}
.rbot-speaking span:nth-child(5){height:7px;animation-delay:.4s}
@keyframes rbot-wave{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}

/* Language badge */
.rbot-lang-badge{display:inline-block;background:rgba(244,196,48,.15);border:1px solid rgba(244,196,48,.3);color:var(--rb-gold);font-size:10px;padding:2px 8px;border-radius:100px;margin-bottom:8px}

/* Mobile */
@media(max-width:480px){
  #rbot-panel{width:calc(100vw - 20px);right:10px;left:10px;bottom:88px;max-height:72vh}
  #rbot-trigger{right:14px;left:auto;bottom:80px}
  #rbot-teaser{left:10px;max-width:calc(100vw - 40px)}
}

/* once the visitor has seen the bot: calm button, no bouncing badge */
#rbot-trigger.rbot-seen #rbot-notif{display:none!important}
#rbot-trigger.rbot-seen::after{animation:none;opacity:0}

/* V3: catalogue answers with direct page links */
.rbot-catalog{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.rbot-cat{background:rgba(11,135,147,.08);border:1px solid rgba(11,135,147,.22);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.rbot-cat-h{font-weight:700;font-size:13px;color:#5fd3e2 !important;text-decoration:none;margin-bottom:3px}
.rbot-link{display:block;color:var(--rb-text,#e6f4f7) !important;text-decoration:none;font-size:12.5px;line-height:1.4;padding:4px 6px;border-radius:6px;transition:background .15s}
.rbot-link span{color:#f4a261}
.rbot-link:hover,.rbot-link:focus{background:rgba(11,135,147,.22);text-decoration:underline}
.rbot-bubble>.rbot-link{display:inline-block;margin:6px 6px 0 0;background:rgba(232,80,10,.16);border:1px solid rgba(232,80,10,.35)}
.rbot-hit{background:rgba(11,135,147,.08);border:1px solid rgba(11,135,147,.22);border-radius:10px;padding:6px 8px}
.rbot-hit small{display:block;font-size:11px;opacity:.75;margin:0 0 2px 6px}
.rbot-msgs{scroll-behavior:smooth}

/* ===== V4: never cross the top edge, visible scroller, voice controls ===== */
#rbot-panel{max-height:min(570px,calc(100vh - 168px - 86px));max-height:min(570px,calc(100dvh - 168px - 86px));min-height:300px}
@media(max-width:480px){#rbot-panel{max-height:calc(100vh - 88px - 76px);max-height:calc(100dvh - 88px - 76px);min-height:260px}}
@media(max-height:600px){#rbot-panel{bottom:96px;max-height:calc(100vh - 96px - 70px);min-height:220px}}
.rbot-msgs-wrap{position:relative;flex:1;min-height:0;display:flex}
.rbot-msgs-wrap .rbot-msgs{flex:1;min-height:0;overflow-y:scroll;padding-right:30px;scrollbar-width:thin;scrollbar-color:#2fb8c9 rgba(255,255,255,.06)}
.rbot-msgs::-webkit-scrollbar{width:8px}
.rbot-msgs::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:8px}
.rbot-msgs::-webkit-scrollbar-thumb{background:linear-gradient(#2fb8c9,#0b8793);border-radius:8px;border:1px solid rgba(0,0,0,.25)}
.rbot-nav{position:absolute;right:12px;top:8px;bottom:8px;display:flex;flex-direction:column;justify-content:space-between;pointer-events:none}
.rbot-nav button{pointer-events:auto;width:24px;height:24px;border-radius:50%;border:1px solid rgba(47,184,201,.55);background:rgba(13,31,45,.92);color:#7fe3f2;font-size:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.4);transition:opacity .2s,background .2s}
.rbot-nav button:hover{background:#0b8793;color:#fff}
.rbot-nav button:disabled{opacity:.25;cursor:default}
.rbot-chips{max-height:84px;overflow-y:auto}
.rbot-hint{margin-top:8px;font-size:11.5px;color:var(--rb-muted);border-top:1px dashed rgba(127,169,184,.3);padding-top:6px}
.rbot-replay{align-self:flex-start;margin:4px 0 0 4px;background:none;border:1px solid rgba(47,184,201,.35);color:#7fe3f2;font-size:11px;border-radius:999px;padding:2px 9px;cursor:pointer;font-family:inherit}
.rbot-replay:hover{background:rgba(11,135,147,.25)}
.rbot-msg.bot{flex-direction:column;align-items:flex-start}
.rbot-mic{width:38px;height:38px;border-radius:50%;border:1px solid rgba(47,184,201,.5);background:rgba(11,135,147,.18);cursor:pointer;font-size:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.rbot-mic.on{background:#e8500a;border-color:#e8500a;animation:rbot-pulse 1.1s ease-in-out infinite}
@keyframes rbot-pulse{0%{box-shadow:0 0 0 0 rgba(232,80,10,.6)}70%{box-shadow:0 0 0 10px rgba(232,80,10,0)}100%{box-shadow:0 0 0 0 rgba(232,80,10,0)}}
.rbot-lang{height:30px;min-width:34px;border-radius:8px;border:1px solid rgba(47,184,201,.4);background:transparent;color:#7fe3f2;font:700 11px sans-serif;cursor:pointer;flex-shrink:0;padding:0 6px}
.rbot-input-row{gap:6px}

/* V5: assistant always above tour bar / overlays when open */
#rbot-panel.open{z-index:2147483000}
#rbot-trigger{z-index:2147482999}
