/* =========================================================
   VoltDev Chat Widget — Telegram-First Contact
   Floating widget pushing users to @VoltDevBot
   ========================================================= */

:root {
  --bg-primary: #0a0f1e;
  --bg-secondary: #121829;
  --bg-tertiary: #1a1f35;
  --accent-primary: #00a3ff;
  --accent-secondary: #00e5ff;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --success-color: #10b981;
  --telegram-blue: #2AABEE;
}

/* Container */
#volt-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── Toggle Button ─────────────────────────── */
.volt-chat-toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--telegram-blue), #229ED9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(42, 171, 238, 0.35),
    0 0 0 0 rgba(42, 171, 238, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  animation: widgetGlow 3s ease-in-out infinite;
}

@keyframes widgetGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(42, 171, 238, 0.35), 0 0 0 0 rgba(42, 171, 238, 0); }
  50% { box-shadow: 0 8px 32px rgba(42, 171, 238, 0.5), 0 0 0 8px rgba(42, 171, 238, 0.08); }
}

.volt-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 36px rgba(42, 171, 238, 0.5);
  animation: none;
}

/* Pulse animation on load */
.volt-chat-pulse {
  animation: pulseAttention 0.6s ease-in-out 3 !important;
}
@keyframes pulseAttention {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.volt-chat-toggle__tg {
  width: 30px;
  height: 30px;
  fill: #fff;
  position: relative;
  z-index: 1;
}

/* Notification badge */
.volt-chat-toggle__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
  animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#volt-chat-widget.is-open .volt-chat-toggle {
  transform: scale(0);
  pointer-events: none;
}

/* ── Chat Panel ─────────────────────────── */
.volt-chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  background: var(--bg-primary);
  border-radius: 16px;
  border: 1px solid rgba(42, 171, 238, 0.15);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(42, 171, 238, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#volt-chat-widget.is-open .volt-chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Header ─────────────────────────── */
.volt-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.12), rgba(0, 163, 255, 0.06));
  border-bottom: 1px solid rgba(42, 171, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.volt-chat-header-info {
  display: flex;
  flex-direction: column;
}

.volt-chat-header-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 3px 0;
}

.volt-chat-online-dot {
  width: 8px;
  height: 8px;
  background: var(--success-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-color);
  margin-left: 4px;
}

.volt-chat-header-subtitle {
  color: var(--success-color);
  font-size: 12px;
  margin: 0;
  font-weight: 500;
}

.volt-chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.volt-chat-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ── Body / Promo ─────────────────────────── */
.volt-chat-body {
  padding: 24px 20px;
}

.volt-chat-promo {
  text-align: center;
}

.volt-chat-promo__icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.volt-chat-promo__title {
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.volt-chat-promo__text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 18px 0;
}

.volt-chat-promo__text strong {
  color: var(--accent-secondary);
}

.volt-chat-promo__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  text-align: left;
  margin-bottom: 20px;
}

.volt-chat-promo__feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.volt-chat-promo__check {
  color: var(--success-color);
  font-weight: 700;
  font-size: 0.85rem;
}

/* CTA Button */
.volt-chat-promo__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--telegram-blue), #229ED9);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(42, 171, 238, 0.3);
}

.volt-chat-promo__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(42, 171, 238, 0.45);
  filter: brightness(1.1);
}

.volt-chat-promo__sub {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
  margin: 10px 0 0 0;
}

/* ── Mobile ─────────────────────────── */
@media (max-width: 480px) {
  #volt-chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .volt-chat-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  #volt-chat-widget.is-open .volt-chat-toggle {
    display: none;
  }
}
