/* Volta — example AI assistant widget (fully client-side) */

.vc-launcher {
  position: fixed; z-index: 70;
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(var(--chat-bottom, 22px) + env(safe-area-inset-bottom));
  width: 62px; height: 62px; border-radius: 20px;
  display: grid; place-items: center;
  border: 1px solid rgba(61, 217, 255, .6);
  background: radial-gradient(circle at 30% 25%, #1b3a78, #0a1430 70%);
  color: #eaf8ff; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(47, 123, 255, .3), 0 12px 34px -8px rgba(47, 123, 255, .8), inset 0 0 18px -4px rgba(61, 217, 255, .6);
  transition: transform .3s cubic-bezier(.2, .7, .1, 1), box-shadow .3s, opacity .3s, visibility .3s;
}
.vc-launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 1px rgba(61, 217, 255, .6), 0 16px 40px -6px rgba(61, 217, 255, .7), inset 0 0 22px -4px rgba(61, 217, 255, .8); }
.vc-launcher:focus-visible { outline: 3px solid #3dd9ff; outline-offset: 4px; }
.vc-launcher svg { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(61, 217, 255, .9)); }
.vc-launcher::before { /* pulse ring */
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  border: 2px solid rgba(61, 217, 255, .7);
  animation: vc-pulse 2.8s cubic-bezier(.2, .7, .1, 1) infinite;
  pointer-events: none;
}
.vc-launcher__badge {
  position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%;
  background: #3dd9ff; border: 3px solid #05070d; box-shadow: 0 0 10px #3dd9ff;
}
.vc-launcher.is-seen .vc-launcher__badge { display: none; }
@keyframes vc-pulse {
  0% { transform: scale(1); opacity: .9; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
.vc-open .vc-launcher { transform: scale(.9); opacity: 0; visibility: hidden; }

/* ---------- Panel ---------- */
.vc-panel {
  position: fixed; z-index: 80;
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(var(--chat-bottom, 22px) + env(safe-area-inset-bottom));
  width: min(400px, calc(100vw - 40px));
  height: min(640px, calc(100vh - 120px));
  height: min(640px, calc(100dvh - 120px));
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, #0c1430, #060912 40%);
  border: 1px solid rgba(61, 217, 255, .4);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(47, 123, 255, .8);
  color: #eaf0ff;
  font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform-origin: bottom right;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.96);
  transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .1, 1), visibility 0s .35s;
}
.vc-panel[hidden] { display: none; }
.vc-panel.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .1, 1); }

.vc-head {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px;
  border-bottom: 1px solid #17223d;
  background: linear-gradient(120deg, rgba(47, 123, 255, .22), rgba(61, 217, 255, .04));
}
.vc-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #3dd9ff, transparent);
  opacity: .7;
}
.vc-avatar {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #2f7bff, #0b1a40 75%);
  border: 1px solid rgba(61, 217, 255, .6);
  box-shadow: 0 0 18px -2px rgba(61, 217, 255, .7);
}
.vc-avatar svg { width: 22px; height: 22px; color: #fff; }
.vc-avatar::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: #3dd9ff; border: 2px solid #0c1430;
}
.vc-title { min-width: 0; flex: 1; }
.vc-title h2 { margin: 0; font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; font-family: inherit; }
.vc-title p {
  margin: 3px 0 0; font: 500 .7rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em; color: #a6b3d2; text-transform: uppercase;
}
.vc-icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid #233457; background: rgba(5, 7, 13, .5); color: #eaf0ff;
  transition: border-color .2s, background-color .2s;
}
.vc-icon-btn:hover { border-color: #3dd9ff; background: rgba(47, 123, 255, .2); }
.vc-icon-btn:focus-visible { outline: 3px solid #3dd9ff; outline-offset: 2px; }
.vc-icon-btn svg { width: 18px; height: 18px; }

.vc-log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: #233457 transparent;
}
.vc-msg {
  max-width: 86%; padding: 11px 15px; border-radius: 18px;
  font-size: .97rem; line-height: 1.5; overflow-wrap: anywhere;
  animation: vc-in .35s cubic-bezier(.2, .7, .1, 1);
}
.vc-msg p { margin: 0; }
.vc-msg p + p { margin-top: 8px; }
.vc-msg a { color: #3dd9ff; }
.vc-msg--bot { align-self: flex-start; background: #101a33; border: 1px solid #1d2b4d; border-bottom-left-radius: 6px; }
.vc-msg--user {
  align-self: flex-end; color: #020611; font-weight: 550;
  background: linear-gradient(100deg, #3dd9ff, #2f7bff); border-bottom-right-radius: 6px;
}
.vc-msg--note {
  align-self: stretch; max-width: none; font-size: .88rem; color: #cfe9ff;
  background: rgba(47, 123, 255, .12); border: 1px dashed rgba(61, 217, 255, .5); border-radius: 14px;
}
@keyframes vc-in { from { opacity: 0; transform: translateY(8px); } }

.vc-summary { margin-top: 8px; display: grid; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid #233457; }
.vc-summary div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 8px 12px; background: rgba(5, 7, 13, .5); }
.vc-summary div + div { border-top: 1px solid #17223d; }
.vc-summary dt { font: 500 .72rem/1.6 ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; color: #8fa0c8; }
.vc-summary dd { margin: 0; font-weight: 650; }

.vc-typing {
  align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px;
  border-radius: 18px; border-bottom-left-radius: 6px; background: #101a33; border: 1px solid #1d2b4d;
}
.vc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #3dd9ff; opacity: .4; animation: vc-dot 1.1s infinite; }
.vc-typing span:nth-child(2) { animation-delay: .15s; }
.vc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vc-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-4px); box-shadow: 0 0 8px #3dd9ff; } }

.vc-chips { flex: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 12px; }
.vc-chips:empty { display: none; }
.vc-chip {
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(61, 217, 255, .5); background: rgba(47, 123, 255, .1); color: #eaf0ff;
  font: 600 .9rem/1.2 inherit; font-family: inherit;
  transition: background-color .2s, box-shadow .2s, border-color .2s;
  animation: vc-in .35s cubic-bezier(.2, .7, .1, 1) both;
}
.vc-chip:hover { background: rgba(47, 123, 255, .28); border-color: #3dd9ff; box-shadow: 0 0 14px -2px rgba(61, 217, 255, .6); }
.vc-chip:focus-visible { outline: 3px solid #3dd9ff; outline-offset: 2px; }

.vc-form { flex: none; display: flex; gap: 8px; padding: 12px; border-top: 1px solid #17223d; background: rgba(5, 7, 13, .6); }
.vc-input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 14px;
  border: 1px solid #233457; background: #080c17; color: #eaf0ff; font: inherit; font-size: 1rem;
}
.vc-input::placeholder { color: #7f8db2; }
.vc-input:focus { outline: none; border-color: #3dd9ff; box-shadow: 0 0 0 3px rgba(61, 217, 255, .2); }
.vc-send {
  flex: none; width: 48px; height: 48px; border-radius: 14px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #020611;
  background: linear-gradient(120deg, #3dd9ff, #2f7bff);
  box-shadow: 0 6px 20px -6px rgba(47, 123, 255, .9);
}
.vc-send:hover { filter: brightness(1.1); }
.vc-send:focus-visible { outline: 3px solid #3dd9ff; outline-offset: 2px; }
.vc-send svg { width: 20px; height: 20px; }
.vc-foot { flex: none; margin: 0; padding: 0 12px 10px; background: rgba(5, 7, 13, .6); text-align: center; font-size: .72rem; color: #7f8db2; }

.vc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mobile: near full-screen sheet ---------- */
@media (max-width: 560px) {
  .vc-launcher { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 18px; }
  .vc-panel {
    left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto; height: auto; border-radius: 22px;
    transform-origin: bottom center;
  }
  .vc-msg { max-width: 90%; }
  .vc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .vc-chips::-webkit-scrollbar { display: none; }
  .vc-chip { flex: none; }
  body.vc-lock { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .vc-launcher::before { animation: none; opacity: .4; transform: scale(1.12); }
  .vc-panel, .vc-panel.is-open, .vc-launcher { transition: opacity .15s, visibility 0s; transform: none; }
  .vc-msg, .vc-chip { animation: none; }
  .vc-typing span { animation: none; opacity: .8; }
}
