/* Vega — Floating companion widget */
/* All classes prefixed .vega- to prevent style bleed */

.vega-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 84px;
  height: 84px;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.vega-bubble:hover {
  transform: scale(1.15);
}
.vega-bubble.vega-hidden { display: none; }

/* ── Star animations (do not touch) ── */

.vega-star-big {
  animation: vega-twinkle-big 3.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.vega-star-med {
  animation: vega-twinkle-med 2.6s ease-in-out infinite;
  animation-delay: 0.5s;
  transform-origin: center;
  transform-box: fill-box;
}
.vega-star-sm {
  animation: vega-twinkle-sm 2.2s ease-in-out infinite;
  animation-delay: 1.1s;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes vega-twinkle-big {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.88); }
}
@keyframes vega-twinkle-med {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.6); }
}
@keyframes vega-twinkle-sm {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.45); }
}

.vega-bubble:hover .vega-star-big,
.vega-bubble:hover .vega-star-med,
.vega-bubble:hover .vega-star-sm {
  animation-play-state: paused;
}

/* ── Panel design (cobalt + neon yellow) ── */

:root {
  --vega-bg-page: #1c2f97;
  --vega-bg-panel: #15257a;
  --vega-accent: #fafb87;
  --vega-icon-gold: #ffa300;
  --vega-text-primary: #FFFFFF;
  --vega-text-secondary: rgba(255, 255, 255, 0.78);
  --vega-text-muted-yellow: rgba(250, 251, 135, 0.6);
  --vega-text-eyebrow: rgba(250, 251, 135, 0.7);
  --vega-border: rgba(250, 251, 135, 0.3);
  --vega-border-soft: rgba(250, 251, 135, 0.18);
  --vega-input-bg: rgba(250, 251, 135, 0.06);
  --vega-user-bubble-bg: rgba(250, 251, 135, 0.1);
  --vega-user-bubble-border: rgba(250, 251, 135, 0.25);
  --vega-button-primary-bg: rgba(250, 251, 135, 0.1);
  --vega-close-color: rgba(250, 251, 135, 0.55);
  --vega-placeholder: rgba(255, 255, 255, 0.4);
}

.vega-panel,
.vega-window {
  position: fixed;
  bottom: 120px;
  right: 24px;
  width: 460px;
  height: 620px;
  background: var(--vega-bg-panel);
  border: 1px solid var(--vega-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Didot', 'Cormorant Garamond', Georgia, serif;
  color: var(--vega-text-primary);
}
.vega-panel.vega-open,
.vega-window.vega-open {
  display: flex;
}

.vega-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--vega-border-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--vega-bg-panel);
}
.vega-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vega-header-avatar {
  display: none;
}
.vega-header-name,
.vega-header-title {
  font-family: 'Didot', 'Cormorant Garamond', Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  font-style: italic;
  color: var(--vega-accent);
  line-height: 1;
  letter-spacing: -0.01em;
}
.vega-header-status,
.vega-header-tagline {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vega-text-muted-yellow);
  display: block;
}
.vega-close,
.vega-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  color: var(--vega-close-color);
  font-weight: 300;
  margin-top: 4px;
}
.vega-close:hover,
.vega-close-btn:hover {
  color: var(--vega-accent);
}

.vega-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--vega-bg-panel);
}
.vega-messages::-webkit-scrollbar { width: 4px; }
.vega-messages::-webkit-scrollbar-thumb {
  background: var(--vega-border-soft);
  border-radius: 2px;
}

.vega-msg,
.vega-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  font-family: 'Didot', 'Cormorant Garamond', Georgia, serif;
}

.vega-msg-eyebrow {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vega-text-eyebrow);
}

.vega-msg-headline {
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: var(--vega-text-primary);
  font-weight: 400;
}

.vega-msg-body {
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vega-text-secondary);
  font-weight: 300;
}

.vega-msg-assistant,
.vega-message-vega {
  align-self: flex-start;
  width: 100%;
}

.vega-msg-user,
.vega-message-user {
  align-self: flex-end;
  max-width: 75%;
  align-items: flex-end;
}
.vega-msg-user .vega-msg-eyebrow {
  text-align: right;
}
.vega-msg-user .vega-msg-headline {
  background: var(--vega-user-bubble-bg);
  border: 1px solid var(--vega-user-bubble-border);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--vega-text-primary);
  display: inline-block;
  font-weight: 400;
}

.vega-msg-typing {
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--vega-text-secondary);
  font-style: italic;
}

.vega-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.vega-action-btn,
.vega-ticket-btn {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: 1px solid var(--vega-accent);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vega-accent);
  transition: background 0.15s ease;
  text-align: center;
}
.vega-action-btn-primary {
  background: var(--vega-button-primary-bg);
}
.vega-action-btn:hover {
  background: rgba(250, 251, 135, 0.08);
}
.vega-action-btn-primary:hover {
  background: rgba(250, 251, 135, 0.2);
}

.vega-input-area,
.vega-input-row {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--vega-border-soft);
  background: var(--vega-bg-panel);
  position: relative;
}

.vega-input {
  width: 100%;
  padding: 16px 80px 16px 24px;
  background: var(--vega-input-bg);
  border: 1px solid var(--vega-border);
  border-radius: 999px;
  font-family: 'Didot', 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--vega-text-primary);
  font-style: italic;
  box-sizing: border-box;
}
.vega-input::placeholder {
  color: var(--vega-placeholder);
  font-style: italic;
}
.vega-input:focus {
  outline: none;
  border-color: var(--vega-accent);
}

.vega-send {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vega-accent);
  opacity: 0.75;
  padding: 8px 4px;
  width: auto;
  height: auto;
  border-radius: 0;
}
.vega-send svg { display: none; }
.vega-send:hover { opacity: 1; }
.vega-send:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 600px) {
  .vega-panel,
  .vega-window {
    width: calc(100vw - 24px);
    height: calc(100vh - 140px);
    bottom: 100px;
    right: 12px;
  }
  .vega-bubble {
    bottom: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
  }
  .vega-header { padding: 24px 24px 16px; }
  .vega-messages { padding: 20px 24px; }
  .vega-input-area, .vega-input-row { padding: 16px 24px 24px; }
  .vega-header-name, .vega-header-title { font-size: 32px; }
}
