/* ============================================================
   NCR TVET — "Eve" Floating Voice + Chat Assistant Widget
   ============================================================ */

#eve-root,
#eve-root *,
#eve-root *::before,
#eve-root *::after { box-sizing: border-box; }

/* FLOATING BUTTON ------------------------------------------- */
.eve-fab{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9500;
  width:64px;
  height:64px;
  border-radius:50%;
  border:none;
  cursor:pointer;
  background:linear-gradient(135deg,#0ea5e9 0%,#14b8a6 100%);
  box-shadow:
    0 12px 32px rgba(14,165,233,.45),
    0 4px 14px rgba(20,184,166,.30),
    inset 0 0 0 1px rgba(255,255,255,.18);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  font-size:24px;
}
.eve-fab:hover{
  transform:translateY(-3px) scale(1.05);
  box-shadow:
    0 18px 44px rgba(14,165,233,.55),
    0 6px 18px rgba(20,184,166,.35),
    inset 0 0 0 1px rgba(255,255,255,.25);
}
.eve-fab::before{
  content:'';
  position:absolute;
  inset:-6px;
  border-radius:50%;
  background:linear-gradient(135deg,rgba(14,165,233,.4),rgba(20,184,166,.4));
  filter:blur(14px);
  z-index:-1;
  opacity:.7;
  animation:eve-pulse 2.4s ease-in-out infinite;
}
@keyframes eve-pulse{
  0%,100%{transform:scale(1);opacity:.55}
  50%{transform:scale(1.18);opacity:.85}
}
.eve-fab-badge{
  position:absolute;
  top:-4px;
  right:-4px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#ef4444;
  border:2px solid #fff;
  font-size:10px;
  font-weight:800;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Outfit',sans-serif;
}

/* PANEL ----------------------------------------------------- */
.eve-panel{
  position:fixed;
  right:22px;
  bottom:96px;
  z-index:9501;
  width:380px;
  max-width:calc(100vw - 32px);
  height:600px;
  max-height:calc(100vh - 120px);
  background:#ffffff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:22px;
  box-shadow:
    0 32px 80px rgba(13,31,60,.25),
    0 8px 24px rgba(13,31,60,.10);
  display:none;
  flex-direction:column;
  overflow:hidden;
  opacity:0;
  transform:translateY(16px) scale(.96);
  transition:opacity .22s, transform .22s cubic-bezier(.34,1.56,.64,1);
  font-family:'Plus Jakarta Sans',sans-serif;
}
.eve-panel.eve-open{
  display:flex;
  opacity:1;
  transform:translateY(0) scale(1);
}

/* HEADER */
.eve-head{
  background:linear-gradient(135deg,#0d2d6e 0%,#0a6fa8 45%,#0d9488 100%);
  color:#fff;
  padding:18px 18px 16px;
  display:flex;
  align-items:center;
  gap:12px;
  position:relative;
  overflow:hidden;
}
.eve-head::after{
  content:'';
  position:absolute;
  inset:0;
  background-image:radial-gradient(circle,rgba(255,255,255,.08) 1px,transparent 1px);
  background-size:18px 18px;
  pointer-events:none;
}
.eve-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  background:linear-gradient(135deg,#7dd3fc,#5eead4);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Outfit',sans-serif;
  font-weight:800;
  font-size:18px;
  color:#0d2d6e;
  box-shadow:0 4px 14px rgba(0,0,0,.18), inset 0 0 0 2px rgba(255,255,255,.4);
  flex-shrink:0;
  position:relative;
  z-index:1;
}
.eve-avatar-pulse{
  position:absolute;
  inset:-3px;
  border-radius:50%;
  border:2px solid rgba(94,234,212,.85);
  opacity:0;
  animation:eve-ring 2s ease-out infinite;
  pointer-events:none;
}
@keyframes eve-ring{
  0%{opacity:.85;transform:scale(1)}
  100%{opacity:0;transform:scale(1.5)}
}
.eve-head-meta{position:relative;z-index:1;flex:1;min-width:0}
.eve-head-title{
  font-family:'Outfit',sans-serif;
  font-weight:800;
  font-size:16px;
  line-height:1.15;
  letter-spacing:-.2px;
}
.eve-head-sub{
  font-size:11px;
  color:rgba(255,255,255,.72);
  margin-top:2px;
  display:flex;
  align-items:center;
  gap:5px;
}
.eve-head-sub .eve-status-dot{
  width:6px;height:6px;border-radius:50%;background:#5eead4;
  box-shadow:0 0 6px #5eead4;
}
.eve-head-actions{display:flex;gap:4px;position:relative;z-index:1}
.eve-icon-btn{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  width:32px;height:32px;
  border-radius:9px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;cursor:pointer;
  transition:background .15s,border-color .15s,transform .15s;
  font-size:12px;
  padding:0;
}
.eve-icon-btn:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.3)}
.eve-icon-btn:active{transform:scale(.94)}

/* MESSAGES */
.eve-body{
  flex:1;
  overflow-y:auto;
  padding:18px 16px 8px;
  background:linear-gradient(180deg,#f8fafc 0%,#eff6ff 100%);
  scrollbar-width:thin;
  scrollbar-color:rgba(13,31,60,.18) transparent;
}
.eve-body::-webkit-scrollbar{width:6px}
.eve-body::-webkit-scrollbar-thumb{background:rgba(13,31,60,.18);border-radius:3px}

.eve-msg{
  display:flex;
  margin-bottom:12px;
  animation:eve-msg-in .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes eve-msg-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.eve-msg-bot{justify-content:flex-start}
.eve-msg-user{justify-content:flex-end}
.eve-bubble{
  max-width:84%;
  padding:11px 14px;
  font-size:13.5px;
  line-height:1.55;
  border-radius:16px;
  word-wrap:break-word;
}
.eve-msg-bot .eve-bubble{
  background:#fff;
  color:#0d1f3c;
  border:1px solid rgba(0,0,0,.06);
  border-bottom-left-radius:4px;
  box-shadow:0 2px 8px rgba(13,31,60,.06);
}
.eve-msg-user .eve-bubble{
  background:linear-gradient(135deg,#0ea5e9,#14b8a6);
  color:#fff;
  border-bottom-right-radius:4px;
  box-shadow:0 4px 14px rgba(14,165,233,.22);
}
.eve-msg-system .eve-bubble{
  background:rgba(99,102,241,.08);
  color:#4338ca;
  border:1px dashed rgba(99,102,241,.3);
  font-size:12px;
  text-align:center;
  margin:0 auto;
  font-weight:600;
}

.eve-typing{display:inline-flex;align-items:center;gap:3px;padding:6px 4px}
.eve-typing span{
  width:6px;height:6px;border-radius:50%;background:#94a3b8;
  animation:eve-dot 1.2s ease-in-out infinite;
}
.eve-typing span:nth-child(2){animation-delay:.15s}
.eve-typing span:nth-child(3){animation-delay:.3s}
@keyframes eve-dot{
  0%,80%,100%{transform:scale(.5);opacity:.4}
  40%{transform:scale(1);opacity:1}
}

/* SUGGESTIONS */
.eve-suggestions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:0 16px 12px;
  background:linear-gradient(180deg,transparent,#eff6ff);
}
.eve-sugg{
  background:#fff;
  border:1px solid rgba(14,165,233,.25);
  color:#0369a1;
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:12px;
  font-weight:600;
  padding:7px 12px;
  border-radius:100px;
  cursor:pointer;
  transition:all .15s;
}
.eve-sugg:hover{background:rgba(14,165,233,.08);border-color:rgba(14,165,233,.5)}

/* INPUT BAR */
.eve-input-wrap{
  background:#fff;
  border-top:1px solid rgba(0,0,0,.06);
  padding:12px 12px;
  display:flex;
  gap:8px;
  align-items:flex-end;
}
.eve-input{
  flex:1;
  background:#f1f5f9;
  border:1.5px solid transparent;
  border-radius:13px;
  padding:11px 14px;
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:14px;
  color:#0d1f3c;
  outline:none;
  resize:none;
  max-height:96px;
  min-height:42px;
  line-height:1.4;
  transition:border-color .15s, background .15s;
}
.eve-input:focus{border-color:rgba(14,165,233,.45); background:#fff}
.eve-input::placeholder{color:#94a3b8}

/* DISCLAIMER */
.eve-disclaimer{
  background:#fff;
  color:#94a3b8;
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:10.5px;
  line-height:1.4;
  text-align:center;
  padding:0 16px 10px;
}

.eve-send{
  background:linear-gradient(135deg,#0ea5e9,#14b8a6);
  color:#fff;
  border:none;
  width:42px;height:42px;
  border-radius:11px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;
  flex-shrink:0;
  transition:transform .15s, box-shadow .15s, opacity .15s;
  box-shadow:0 4px 14px rgba(14,165,233,.3);
}
.eve-send:hover{transform:translateY(-1px); box-shadow:0 6px 18px rgba(14,165,233,.4)}
.eve-send:active{transform:translateY(0) scale(.96)}
.eve-send:disabled{opacity:.5;cursor:not-allowed}

/* SETTINGS PANEL */
.eve-settings{
  position:absolute;
  inset:0;
  background:#fff;
  z-index:2;
  display:none;
  flex-direction:column;
}
.eve-settings.eve-open{display:flex}
.eve-settings .eve-head{cursor:default}
.eve-settings-body{
  flex:1;
  overflow-y:auto;
  padding:20px 18px;
  font-size:13.5px;
  color:#0d1f3c;
}
.eve-settings-section{margin-bottom:22px}
.eve-settings-label{
  display:block;
  font-size:11px;
  font-weight:700;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:#5b7a9a;
  margin-bottom:7px;
}
.eve-settings-input{
  width:100%;
  background:#f1f5f9;
  border:1.5px solid transparent;
  border-radius:10px;
  padding:11px 13px;
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:13px;
  color:#0d1f3c;
  outline:none;
  transition:border-color .15s, background .15s;
}
.eve-settings-input:focus{border-color:rgba(14,165,233,.45); background:#fff}
.eve-settings-hint{
  font-size:11.5px;
  color:#64748b;
  line-height:1.55;
  margin-top:6px;
}
.eve-settings-hint code{
  background:#0d1f3c;
  color:#7dd3fc;
  padding:2px 6px;
  border-radius:4px;
  font-size:11px;
  font-family:'Space Grotesk',monospace;
}
.eve-settings-save{
  width:100%;
  background:linear-gradient(135deg,#0ea5e9,#14b8a6);
  color:#fff;
  border:none;
  padding:13px;
  border-radius:11px;
  font-family:'Plus Jakarta Sans',sans-serif;
  font-weight:800;
  font-size:13.5px;
  cursor:pointer;
  margin-top:8px;
  transition:opacity .15s;
}
.eve-settings-save:hover{opacity:.9}
.eve-settings-status{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11.5px;font-weight:700;
  padding:5px 11px;border-radius:100px;
  margin-bottom:6px;
}
.eve-status-ok{background:rgba(5,150,105,.1);color:#047857}
.eve-status-warn{background:rgba(245,158,11,.1);color:#b45309}
.eve-status-err{background:rgba(239,68,68,.1);color:#b91c1c}
.eve-status-ok::before{content:'';width:6px;height:6px;border-radius:50%;background:#047857}
.eve-status-warn::before{content:'';width:6px;height:6px;border-radius:50%;background:#b45309}
.eve-status-err::before{content:'';width:6px;height:6px;border-radius:50%;background:#b91c1c}

/* MOBILE -------------------------------------------------- */
@media(max-width:520px){
  .eve-fab{right:14px;bottom:14px;width:56px;height:56px}
  .eve-panel{
    right:0;
    left:0;
    bottom:0;
    width:100vw;
    max-width:100vw;
    height:88vh;
    max-height:88vh;
    border-radius:20px 20px 0 0;
  }
}

/* Hide widget on print */
@media print{ .eve-fab,.eve-panel{display:none !important} }
