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

.vega-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 10000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1.5px solid rgba(255,255,255,0.08);
}
.vega-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}
.vega-bubble svg {
  width: 24px;
  height: 24px;
}
.vega-bubble.vega-hidden { display: none; }

.vega-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.vega-window.vega-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.vega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #1a1a1a;
  color: #fff;
}
.vega-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vega-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a86c 0%, #a07d3a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.vega-header-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.vega-header-status {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
}
.vega-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
}
.vega-close:hover { color: #fff; }

.vega-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 340px;
  background: #fafafa;
}

.vega-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
  word-wrap: break-word;
}
.vega-msg-assistant {
  align-self: flex-start;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,0.06);
  border-bottom-left-radius: 4px;
}
.vega-msg-user {
  align-self: flex-end;
  background: #1a1a1a;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.vega-msg-typing {
  align-self: flex-start;
  background: #fff;
  color: #999;
  border: 1px solid rgba(0,0,0,0.06);
  border-bottom-left-radius: 4px;
  font-style: italic;
}

.vega-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}
.vega-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: #fafafa;
  transition: border-color 0.15s;
}
.vega-input:focus {
  border-color: rgba(0,0,0,0.25);
  background: #fff;
}
.vega-input::placeholder {
  color: #aaa;
}
.vega-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.vega-send:hover { background: #333; }
.vega-send:disabled { background: #ccc; cursor: default; }
.vega-send svg { width: 16px; height: 16px; }

.vega-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  background: #fff;
}
.vega-action-btn {
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}
.vega-action-btn:hover {
  border-color: rgba(0,0,0,0.25);
  color: #1a1a1a;
}

@media (max-width: 480px) {
  .vega-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    max-height: 70vh;
  }
  .vega-bubble {
    bottom: 16px;
    right: 16px;
  }
}
