/**
 * Nexo — the ADMIT NEXUS guide assistant (free-text chat, no option buttons).
 */

.nexo-root { position: fixed; bottom: 18px; right: 18px; z-index: 9998; font-family: var(--nx-font, inherit); }
.nexo-root * { box-sizing: border-box; }

/* Launcher ------------------------------------------------------------ */
.nexo-launch {
  position: relative; display: inline-flex; align-items: center; gap: 11px; border: 0; cursor: pointer;
  min-height: 56px; padding: 0 22px 0 14px; border-radius: 999px;
  background: linear-gradient(135deg, #F4AC1E, #FFD978); color: #2A0A36;
  font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 14px 34px rgba(244, 172, 30, .32), 0 2px 8px rgba(18, 4, 24, .3);
  transition: transform .18s ease, box-shadow .18s ease;
}
.nexo-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(244, 172, 30, .42); }
.nexo-launch:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nexo-mark {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; background: #2A0A36; color: #F4AC1E;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; letter-spacing: -.02em;
}
.nexo-mark svg, .nexo-ava svg { width: 64%; height: 64%; display: block; }
.nexo-ping { position: absolute; top: 2px; inset-inline-end: 6px; width: 12px; height: 12px; border-radius: 50%; background: #3BD38A; border: 2px solid #FFD978; }
.nexo-root.nexo-greeted .nexo-ping { display: none; }
.nexo-root.nexo-open .nexo-launch { display: none; }

/* Panel --------------------------------------------------------------- */
.nexo-panel {
  display: none; flex-direction: column; overflow: hidden;
  width: min(392px, calc(100vw - 32px)); height: min(630px, calc(100vh - 110px));
  border-radius: 24px; background: #1A0622; border: 1px solid rgba(181, 123, 176, .26);
  box-shadow: 0 30px 70px rgba(10, 2, 14, .6);
}
.nexo-root.nexo-open .nexo-panel { display: flex; }

.nexo-head { display: flex; align-items: center; gap: 12px; padding: 15px 17px; background: linear-gradient(135deg, #581970, #2A0A36); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nexo-ava { width: 43px; height: 43px; border-radius: 15px; flex: 0 0 auto; background: linear-gradient(135deg, #F4AC1E, #FFD978); color: #2A0A36; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; letter-spacing: -.03em; }
.nexo-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.nexo-id b { color: #fff; font-size: 16px; font-weight: 800; line-height: 1.2; }
.nexo-id span { color: #C9A8C6; font-size: 11.5px; line-height: 1.4; display: inline-flex; align-items: center; gap: 6px; }
.nexo-id span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3BD38A; flex: 0 0 auto; }
.nexo-x { width: 36px; height: 36px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; font-size: 19px; line-height: 1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0; }
.nexo-x:hover { background: rgba(255, 255, 255, .13); }

/* Thread -------------------------------------------------------------- */
.nexo-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nexo-body::-webkit-scrollbar { width: 6px; }
.nexo-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 99px; }

.nexo-msg { max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; animation: nexo-in .22s ease both; }
.nexo-bot { align-self: flex-start; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #F3E9F2; border-start-start-radius: 6px; }
.nexo-me { align-self: flex-end; background: linear-gradient(135deg, #F4AC1E, #FFD978); color: #2A0A36; font-weight: 600; border-end-end-radius: 6px; }
.nexo-bot b, .nexo-bot strong { color: #FFD978; font-weight: 800; }
.nexo-bot a { color: #FFD978; }
.nexo-err { align-self: center; max-width: 94%; text-align: center; font-size: 12.5px; color: #FFC9C9; background: rgba(180, 40, 40, .16); border: 1px solid rgba(255, 120, 120, .3); padding: 9px 14px; border-radius: 13px; line-height: 1.7; }
@keyframes nexo-in { from { opacity: 0; transform: translateY(8px); } }

.nexo-typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 15px 18px; border-radius: 18px; border-start-start-radius: 6px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.nexo-typing i { width: 7px; height: 7px; border-radius: 50%; background: #B57BB0; animation: nexo-blink 1.1s infinite; }
.nexo-typing i:nth-child(2) { animation-delay: .18s; } .nexo-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes nexo-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* Composer ------------------------------------------------------------ */
.nexo-compose { display: flex; align-items: flex-end; gap: 9px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .025); }
.nexo-compose textarea {
  flex: 1 1 auto; min-height: 46px; max-height: 118px; padding: 12px 15px; border-radius: 15px; resize: none;
  font-family: inherit; font-size: 14.5px; line-height: 1.55;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
}
.nexo-compose textarea::placeholder { color: #A98BA6; }
.nexo-compose textarea:focus { outline: 0; border-color: #F4AC1E; background: rgba(255, 255, 255, .1); }
.nexo-send {
  width: 46px; height: 46px; flex: 0 0 auto; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #F4AC1E, #FFD978); color: #2A0A36;
  display: flex; align-items: center; justify-content: center; transition: opacity .15s ease, transform .12s ease;
}
.nexo-send:hover:not(:disabled) { transform: translateY(-1px); }
.nexo-send:disabled { opacity: .4; cursor: default; }
.nexo-send svg { width: 20px; height: 20px; }
html[dir="rtl"] .nexo-send svg { transform: scaleX(-1); }

.nexo-foot { padding: 0 16px 12px; text-align: center; }
.nexo-foot { font-size: 11px; color: #8E6F8B; line-height: 1.6; }
.nexo-foot a { font-size: 11.5px; color: #F4AC1E; font-weight: 800; text-decoration: none; }
.nexo-foot a:hover { color: #FFD978; text-decoration: underline; }

/* Phone --------------------------------------------------------------- */
@media (max-width: 620px) {
  .nexo-root { bottom: 14px; right: 14px; left: 14px; }
  .nexo-launch { min-height: 52px; font-size: 14px; padding: 0 18px 0 12px; }
  .nexo-panel { width: 100%; height: min(80vh, calc(100vh - 92px)); }
}

@media (prefers-reduced-motion: reduce) {
  .nexo-msg, .nexo-launch, .nexo-send { animation: none; transition: none; }
}

/* Buttons Nexo offers when there is a real next step --------------------- */
.nexo-acts { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 94%; margin-top: -3px; animation: nexo-in .22s ease both; }
.nexo-act {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none;
  min-height: 40px; padding: 8px 15px; border-radius: 13px;
  font-family: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: start;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.nexo-act:hover { transform: translateY(-1px); }
.nexo-act:focus-visible { outline: 2px solid #F4AC1E; outline-offset: 2px; }
.nexo-act svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: .85; }
html[dir="rtl"] .nexo-act svg { transform: scaleX(-1); }

/* the one next step we always leave open: booking */
.nexo-act-go { background: linear-gradient(135deg, #F4AC1E, #FFD978); color: #2A0A36; border: 0; }
.nexo-act-go:hover { background: linear-gradient(135deg, #FFD978, #F4AC1E); color: #2A0A36; }

/* a service page or an article — useful, but not the headline */
.nexo-act-link { background: rgba(244, 172, 30, .1); color: #FFD978; border: 1px solid rgba(244, 172, 30, .5); }
.nexo-act-link:hover { background: rgba(244, 172, 30, .2); border-color: #F4AC1E; color: #FFE9B0; }

/* an answer the visitor can tap instead of typing */
.nexo-act-say { background: rgba(255, 255, 255, .07); color: #F3E9F2; border: 1px solid rgba(181, 123, 176, .45); }
.nexo-act-say:hover { background: rgba(244, 172, 30, .15); border-color: #F4AC1E; }
