/* Nexa website assistant — design mirrors the NexaMails app (FAB + right slide-in panel). */
#nexa-widget{
  --gold:#B28E44; --gold-dark:#8E6F35;
  --red:#E92A2E; --red-dark:#C81F23;
  --cream:#F7F3E9; --cream-dark:#EDE6D2;
  --navy:#282F39; --navy-soft:#4A5260;
  --paper:#FFFFFF; --line:#E2DBC8; --muted:#8A8576;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
}
#nexa-widget, #nexa-widget *{ box-sizing:border-box; }
#nexa-widget button{ font-family:var(--font); }

/* ---------- FAB ---------- */
.nexa-fab{position:fixed;bottom:22px;right:22px;width:56px;height:56px;border-radius:14px;background:#000;border:none;
  cursor:pointer;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 14px rgba(0,0,0,.4),0 0 18px rgba(255,111,174,.5);z-index:2147483000;transition:transform .15s,box-shadow .15s;}
.nexa-fab:hover{transform:scale(1.08);box-shadow:0 6px 22px rgba(0,0,0,.5),0 0 26px rgba(255,111,174,.75);}
.nexa-fab img{width:70%;height:70%;display:block;object-fit:contain;}
.nexa-fab .nexa-fab-x{display:none;color:#fff;font-size:22px;font-weight:300;line-height:1;}
.nexa-fab.open img{display:none;}
.nexa-fab.open .nexa-fab-x{display:block;}
body.nexa-panel-open .nexa-fab{display:none;}
@keyframes nexa-breathe{
  0%,100%{box-shadow:0 4px 14px rgba(0,0,0,.4),0 0 16px rgba(255,111,174,.55),0 0 0 0 rgba(255,111,174,.6);transform:scale(1);}
  50%{box-shadow:0 4px 14px rgba(0,0,0,.4),0 0 22px rgba(255,111,174,.75),0 0 0 16px rgba(255,111,174,0);transform:scale(1.025);}
}
.nexa-fab:not(.open):not(:hover){animation:nexa-breathe 2.6s ease-in-out infinite;}
@media(prefers-reduced-motion:reduce){.nexa-fab{animation:none!important;}}

/* ---------- Panel ---------- */
.nexa-panel{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:calc(100vw - 24px);background:var(--paper);
  border-left:1px solid var(--line);box-shadow:-8px 0 40px rgba(40,47,57,.18);display:flex;flex-direction:column;
  z-index:2147483001;overflow:hidden;transform:translateX(100%);transition:transform .25s ease-out;pointer-events:none;
  font-family:var(--font);color:var(--navy);}
.nexa-panel.open{transform:translateX(0);pointer-events:auto;}
.nexa-panel-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--cream);flex-shrink:0;}
.nexa-panel-title{display:flex;align-items:center;gap:10px;font-weight:600;letter-spacing:.2px;color:var(--navy);font-size:15px;}
.nexa-mini-logo{width:28px;height:28px;background:#000;border-radius:6px;padding:3px;object-fit:contain;display:block;box-sizing:border-box;flex-shrink:0;}
.nexa-panel-actions{display:flex;align-items:center;gap:8px;}
.nexa-close{background:transparent;border:none;color:var(--navy-soft);font-size:22px;line-height:1;width:28px;height:28px;border-radius:6px;cursor:pointer;}
.nexa-close:hover{background:var(--cream-dark);color:var(--navy);}
.nexa-new-chat{display:inline-flex;align-items:center;gap:5px;background:var(--red);color:#fff;border:none;border-radius:999px;
  padding:6px 12px;font-size:12px;font-weight:600;cursor:pointer;box-shadow:0 2px 6px rgba(233,42,46,.25);transition:background .15s,transform .1s;}
.nexa-new-chat:hover{background:var(--red-dark);transform:translateY(-1px);}
.nexa-new-chat svg{width:14px;height:14px;fill:currentColor;}
.nexa-new-chat[hidden]{display:none;}

/* ---------- Welcome ---------- */
.nexa-welcome{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:24px;text-align:center;min-height:0;overflow-y:auto;}
.nexa-welcome[hidden]{display:none;}
.nexa-big-logo{width:72px;height:72px;border-radius:18px;overflow:hidden;margin-bottom:18px;box-shadow:0 6px 20px rgba(0,0,0,.18);background:#000;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.nexa-big-logo img{width:70%;height:70%;display:block;object-fit:contain;}
.nexa-greet{font-size:16px;font-weight:500;margin-bottom:24px;color:var(--navy-soft);}

.nexa-input-wrap{width:100%;background:var(--cream);border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;transition:border-color .15s;}
.nexa-input-wrap:focus-within{border-color:var(--gold);}
.nexa-input{width:100%;background:transparent;color:var(--navy);border:none;outline:none;resize:none;font-family:inherit;font-size:13.5px;line-height:1.5;min-height:40px;max-height:160px;unicode-bidi:plaintext;}
.nexa-input::placeholder{color:var(--muted);}
.nexa-input-actions{display:flex;justify-content:space-between;align-items:center;}
.nexa-input-actions-left{display:flex;gap:2px;align-items:center;}
.nexa-send{background:var(--navy);color:#fff;border:none;padding:7px 16px;border-radius:999px;font-weight:600;font-size:13px;cursor:pointer;flex-shrink:0;transition:opacity .15s;}
.nexa-send:hover:not(:disabled){opacity:.85;}
.nexa-send:disabled{opacity:.45;cursor:not-allowed;}
.nexa-footer-note{margin-top:20px;font-size:10.5px;color:var(--muted);text-align:center;line-height:1.5;}

.nexa-suggestions{margin-top:16px;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;width:100%;}
.nexa-chip{background:var(--cream);border:1px solid var(--line);color:var(--navy);padding:8px 16px;border-radius:999px;font-size:12.5px;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .15s,color .15s,background .15s,box-shadow .15s;}
.nexa-chip:hover{border-color:var(--red);color:var(--red-dark);background:var(--paper);box-shadow:0 2px 6px rgba(233,42,46,.08);}
.nexa-chip:active{transform:translateY(1px);}

/* ---------- Chat ---------- */
.nexa-chat{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;}
.nexa-chat[hidden]{display:none;}
.nexa-messages{flex:1;overflow-y:auto;padding:18px 16px;display:flex;flex-direction:column;gap:12px;min-height:0;}
.nexa-messages::-webkit-scrollbar{width:6px;}
.nexa-messages::-webkit-scrollbar-thumb{background:rgba(40,47,57,.15);border-radius:3px;}
.nexa-foot{flex-shrink:0;padding:12px 14px;border-top:1px solid var(--line);background:var(--paper);}
.nexa-foot .nexa-input{min-height:24px;}

.nexa-msg-wrap{display:flex;flex-direction:column;max-width:90%;}
.nexa-msg-wrap.user{align-self:flex-end;align-items:flex-end;}
.nexa-msg-wrap.assistant{align-self:flex-start;align-items:flex-start;}
.nexa-msg{padding:10px 14px;border-radius:14px;font-size:13.5px;line-height:1.55;word-wrap:break-word;unicode-bidi:plaintext;}
.nexa-msg.user{background:var(--red);color:#fff;border-bottom-right-radius:4px;white-space:pre-wrap;}
.nexa-msg.assistant{background:var(--cream);color:var(--navy);border:1px solid var(--line);border-bottom-left-radius:4px;}
.nexa-msg.error{background:#FCEDED;color:#8B1F1F;border:1px solid rgba(196,69,69,.3);}
.nexa-msg p{margin:0 0 .6em;}.nexa-msg p:last-child{margin-bottom:0;}
.nexa-msg ul,.nexa-msg ol{margin:.4em 0;padding-left:1.2em;}
.nexa-msg a{color:var(--red-dark);font-weight:600;}
.nexa-msg code{background:rgba(40,47,57,.08);padding:1px 5px;border-radius:5px;font-size:.92em;}

/* typing dots */
.nexa-typing{display:inline-flex;gap:4px;align-items:center;}
.nexa-typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);display:inline-block;animation:nexa-bounce 1.2s infinite ease-in-out;}
.nexa-typing i:nth-child(2){animation-delay:.15s;}.nexa-typing i:nth-child(3){animation-delay:.3s;}
@keyframes nexa-bounce{0%,80%,100%{transform:scale(.6);opacity:.4;}40%{transform:scale(1);opacity:1;}}

@media(max-width:520px){.nexa-panel{width:100vw;max-width:100vw;border-left:none;}}

/* reCAPTCHA badge: bottom-LEFT corner (away from the Nexa button) and collapsed to just
   the small logo. Expands on hover to reveal the Privacy/Terms links = Google-ToS friendly. */
.grecaptcha-badge{
  left:14px!important;right:auto!important;
  width:70px!important;overflow:hidden!important;
  transition:width .25s ease!important;
  box-shadow:0 0 6px rgba(0,0,0,.25)!important;
}
.grecaptcha-badge:hover{width:256px!important;}
