/* ============================================================
   VALIRIS — Chat Widget Styles
   Uses the same CSS variables as style.css
   ============================================================ */

/* ── Bubble (trigger button) ──────────────────────────────── */
.vc-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green, #00C96B);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 201, 107, 0.4), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.vc-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 201, 107, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.vc-bubble:active {
  transform: scale(0.96);
}

/* ── Chat window ──────────────────────────────────────────── */
.vc-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  height: 560px;
  background: var(--surface, #111111);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.vc-window--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Header ───────────────────────────────────────────────── */
.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--surface-2, #1a1a1a);
  flex-shrink: 0;
}

.vc-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
}

.vc-header-title {
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #ffffff);
  letter-spacing: 0.02em;
}

.vc-header-sub {
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 11px;
  color: var(--text-2, #a0a0a0);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.vc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green, #00C96B);
  display: inline-block;
  animation: vc-pulse 2s ease-in-out infinite;
}

@keyframes vc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.vc-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2, #a0a0a0);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.vc-close:hover {
  color: var(--text, #ffffff);
  background: var(--surface-3, #242424);
}

/* ── Messages area ────────────────────────────────────────── */
.vc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border, rgba(255,255,255,0.08)) transparent;
}

.vc-messages::-webkit-scrollbar {
  width: 4px;
}

.vc-messages::-webkit-scrollbar-thumb {
  background: var(--border, rgba(255,255,255,0.08));
  border-radius: 2px;
}

/* ── Message bubbles ──────────────────────────────────────── */
.vc-message {
  display: flex;
  animation: vc-fadein 0.2s ease-out;
}

.vc-message--user {
  justify-content: flex-end;
}

.vc-message--bot {
  justify-content: flex-start;
}

.vc-message--error {
  justify-content: flex-start;
}

@keyframes vc-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vc-bubble-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 13.5px;
  line-height: 1.55;
}

.vc-message--user .vc-bubble-msg {
  background: var(--green, #00C96B);
  color: #000;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.vc-message--bot .vc-bubble-msg {
  background: var(--surface-2, #1a1a1a);
  color: var(--text, #ffffff);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-bottom-left-radius: 4px;
}

.vc-message--error .vc-bubble-msg {
  background: rgba(255, 68, 68, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-bottom-left-radius: 4px;
  font-size: 12.5px;
}

/* ── Typing indicator ─────────────────────────────────────── */
.vc-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  min-width: 52px;
}

.vc-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3, #666666);
  animation: vc-bounce 1.2s ease-in-out infinite;
}

.vc-typing span:nth-child(2) { animation-delay: 0.15s; }
.vc-typing span:nth-child(3) { animation-delay: 0.30s; }

@keyframes vc-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* ── Suggestion chips ─────────────────────────────────────── */
.vc-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
  animation: vc-fadein 0.25s ease-out;
}

.vc-suggestion {
  background: var(--surface-2, #1a1a1a);
  border: 1px solid var(--border-2, rgba(255,255,255,0.12));
  border-radius: 8px;
  color: var(--text-2, #a0a0a0);
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 12.5px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.vc-suggestion:hover {
  background: var(--surface-3, #242424);
  color: var(--text, #ffffff);
  border-color: rgba(0, 201, 107, 0.3);
}

/* ── Footer (CTA + input) ─────────────────────────────────── */
.vc-footer {
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  flex-shrink: 0;
  background: var(--surface, #111111);
}

/* ── CTA bar ──────────────────────────────────────────────── */
.vc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  background: rgba(0, 201, 107, 0.06);
  animation: vc-fadein 0.3s ease-out;
}

.vc-cta-text {
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 11.5px;
  color: var(--text-2, #a0a0a0);
  line-height: 1.4;
}

.vc-cta-btn {
  background: var(--green, #00C96B);
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.vc-cta-btn:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

/* ── Input row ────────────────────────────────────────────── */
.vc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.vc-input {
  flex: 1;
  background: var(--surface-2, #1a1a1a);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  color: var(--text, #ffffff);
  font-family: var(--font, 'Inter', sans-serif);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.vc-input::placeholder {
  color: var(--text-3, #666666);
}

.vc-input:focus {
  border-color: rgba(0, 201, 107, 0.4);
}

.vc-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vc-send {
  background: var(--green, #00C96B);
  border: none;
  border-radius: 8px;
  color: #000;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.vc-send:hover:not(:disabled) {
  opacity: 0.85;
  transform: scale(1.05);
}

.vc-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Mobile: full screen ──────────────────────────────────── */
@media (max-width: 480px) {
  .vc-bubble {
    bottom: 16px;
    right: 16px;
  }

  .vc-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
}
