/* ============================================================
   ULTRA Assistant — branded concierge widget
   Self-contained. Injected on every page by assistant.js.
   ============================================================ */

.ua-launcher {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 70;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 1.1rem 0.55rem 0.6rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(124,58,237,0.30), rgba(236,72,153,0.22));
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 var(--gold-hairline), 0 14px 40px rgba(124,58,237,0.35);
  color: var(--text); font-weight: var(--fw-semi); font-size: var(--fs-sm); font-family: var(--font);
  cursor: pointer; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med);
}
.ua-launcher:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--gold-hairline), 0 18px 50px rgba(236,72,153,0.45); }
.ua-launcher.hidden { opacity: 0; pointer-events: none; transform: translateY(10px) scale(0.96); }
.ua-launcher .u { position: relative; width: 34px; height: 34px; flex: none; }
.ua-launcher .u img { width: 100%; height: 100%; object-fit: contain; }
.ua-launcher .u::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(236,72,153,0.5); animation: ua-pulse 2.4s var(--ease) infinite;
}
@keyframes ua-pulse { 0% { transform: scale(0.85); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

.ua-panel {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 71;
  width: min(380px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 2rem));
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(14,14,26,0.96), rgba(7,7,16,0.98));
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--gold-hairline), 0 30px 80px rgba(0,0,0,0.6);
  overflow: hidden;
  transform: translateY(16px) scale(0.98); opacity: 0; pointer-events: none;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.ua-panel.open { transform: none; opacity: 1; pointer-events: auto; }

.ua-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(236,72,153,0.12));
}
.ua-head .av { width: 34px; height: 34px; flex: none; }
.ua-head .av img { width: 100%; height: 100%; object-fit: contain; }
.ua-head .who { flex: 1; line-height: 1.2; }
.ua-head .nm { font-weight: var(--fw-semi); font-size: var(--fs-sm); }
.ua-head .st { font-size: var(--fs-xs); color: var(--text-faint); display: flex; align-items: center; gap: 0.35rem; }
.ua-head .st .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.ua-close { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 6px; }
.ua-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.ua-close svg { width: 20px; height: 20px; }

.ua-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; }
.ua-body::-webkit-scrollbar { width: 7px; }
.ua-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 4px; }

.ua-msg { display: flex; gap: 0.6rem; align-items: flex-end; max-width: 90%; }
.ua-msg .av { width: 26px; height: 26px; flex: none; border-radius: 50%; overflow: hidden; }
.ua-msg .av img { width: 100%; height: 100%; object-fit: cover; }
.ua-bubble { padding: 0.7rem 0.9rem; border-radius: 14px; font-size: var(--fs-sm); line-height: 1.5; }
.ua-msg.bot .ua-bubble { background: var(--glass-2); border: 1px solid var(--glass-border); border-bottom-left-radius: 4px; color: var(--text); }
.ua-msg.bot .ua-bubble a { color: var(--violet-300); font-weight: var(--fw-semi); }
.ua-msg.user { margin-left: auto; flex-direction: row-reverse; }
.ua-msg.user .ua-bubble { background: var(--grad-brand); color: #fff; border-bottom-right-radius: 4px; }

.ua-typing { display: inline-flex; gap: 4px; padding: 0.8rem 0.9rem; background: var(--glass-2); border: 1px solid var(--glass-border); border-radius: 14px; border-bottom-left-radius: 4px; }
.ua-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-300); animation: ua-bounce 1.2s infinite; }
.ua-typing span:nth-child(2) { animation-delay: 0.15s; }
.ua-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ua-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

.ua-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.1rem 0.6rem; }
.ua-chip {
  font-family: var(--font); font-size: var(--fs-xs); font-weight: var(--fw-medium);
  color: var(--text); padding: 0.45rem 0.8rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--grad-brand-soft);
  cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast);
}
.ua-chip:hover { background: rgba(139,92,246,0.18); border-color: var(--violet-300); }

.ua-input-row { display: flex; gap: 0.5rem; padding: 0.85rem 1.1rem; border-top: 1px solid var(--border); }
.ua-input {
  flex: 1; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-pill);
  padding: 0.65rem 1rem; color: var(--text); font-family: var(--font); font-size: var(--fs-sm); outline: none;
}
.ua-input:focus { border-color: var(--violet-300); }
.ua-input::placeholder { color: var(--text-faint); }
.ua-send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad-brand); color: #fff; display: grid; place-items: center;
  transition: transform var(--t-fast), box-shadow var(--t-med);
}
.ua-send:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(236,72,153,0.4); }
.ua-send svg { width: 18px; height: 18px; }

/* section flash when the assistant scrolls you somewhere */
.ua-flash { animation: ua-flash 2s var(--ease); }
@keyframes ua-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,97,0); }
  20% { box-shadow: 0 0 0 2px rgba(201,169,97,0.7), 0 0 40px rgba(124,58,237,0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .ua-launcher .u::after, .ua-typing span { animation: none; }
  .ua-panel { transition: opacity var(--t-fast); }
}
