/* xaviera.tech — WhatsApp & Telegram chat toggle */

.chat-widget {
  position: fixed;
  bottom: calc(var(--statusbar-h, 26px) + 20px);
  left: calc(var(--activity-w, 48px) + 16px);
  z-index: 9990;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 10px;
}

.chat-widget-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(26, 143, 224, 0.35);
  background: linear-gradient(135deg, var(--brand, #1a8fe0), #2563eb);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(26, 143, 224, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chat-widget-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 32px rgba(26, 143, 224, 0.45);
}

.chat-widget-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.chat-widget.open .chat-widget-toggle svg {
  transform: rotate(45deg);
}

.chat-widget-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transform-origin: bottom left;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}

.chat-widget.open .chat-widget-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-widget-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 28px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget-link:hover {
  transform: translateX(4px);
}

.chat-widget-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.chat-widget-link.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-color: rgba(255, 255, 255, 0.15);
}

.chat-widget-link.whatsapp:hover {
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
}

.chat-widget-link.telegram {
  background: linear-gradient(135deg, #2aabee, #229ed9);
  border-color: rgba(255, 255, 255, 0.15);
}

.chat-widget-link.telegram:hover {
  box-shadow: 0 4px 24px rgba(42, 171, 238, 0.4);
}

.chat-widget-label {
  padding-right: 4px;
}

/* Footer & contact social icons */
.social-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-chat svg {
  width: 18px;
  height: 18px;
}

.social-chat.whatsapp:hover { color: #25d366; }
.social-chat.telegram:hover { color: #2aabee; }

.contact-chat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.contact-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--mono, monospace);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-chat-btn svg {
  width: 18px;
  height: 18px;
}

.contact-chat-btn.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.contact-chat-btn.telegram {
  background: linear-gradient(135deg, #2aabee, #229ed9);
}

.contact-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
  .chat-widget {
    left: 16px;
  }
}

@media (max-width: 768px) {
  .chat-widget {
    bottom: calc(var(--statusbar-h, 26px) + 12px);
    left: 12px;
  }

  .chat-widget-toggle {
    width: 48px;
    height: 48px;
  }

  .chat-widget-label {
    display: none;
  }

  .chat-widget-link {
    padding: 12px;
    border-radius: 50%;
  }
}
