/* =========================================
   BYTESAR CHAT WIDGET - LAUNCHER STYLES
   Custom floating chat button with Tawk.to integration
   All selectors prefixed with .byt-chat- to avoid conflicts
   ========================================= */

.byt-chat-launcher {
  position: fixed;
  right: 15px;
  bottom: 70px;
  z-index: 997;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-primary);
  transition: all 0.3s ease;
  outline: 2px solid rgba(0, 217, 255, 0.2);
  outline-offset: 3px;
  padding: 0;
}

.byt-chat-launcher:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--glow-primary-hover);
  outline-color: rgba(0, 217, 255, 0.4);
}

.byt-chat-launcher:active {
  transform: translateY(0) scale(0.98);
}

/* Icons */
.byt-chat-launcher i {
  font-size: 24px;
  color: #ffffff;
  transition: transform 0.2s ease;
  line-height: 1;
}

.byt-chat-launcher i.ti-x {
  display: none;
}

.byt-chat-launcher.byt-chat-open i.ti-message-circle {
  display: none;
}

.byt-chat-launcher.byt-chat-open i.ti-x {
  display: block;
}

/* Unread message badge */
.byt-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-body);
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a1628;
  line-height: 1;
}

.byt-chat-badge.byt-chat-has-unread {
  display: flex;
}

/* Hover tooltip */
.byt-chat-tooltip {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: #1a1f2e;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid rgba(0, 217, 255, 0.2);
  backdrop-filter: blur(10px);
}

.byt-chat-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #1a1f2e;
}

.byt-chat-launcher:hover .byt-chat-tooltip {
  opacity: 1;
}

/* Pulse animation to attract attention */
@keyframes byt-chat-pulse {
  0%, 100% {
    outline-offset: 3px;
    outline-color: rgba(0, 217, 255, 0.3);
  }
  50% {
    outline-offset: 8px;
    outline-color: rgba(0, 217, 255, 0.08);
  }
}

.byt-chat-launcher.byt-chat-pulse {
  animation: byt-chat-pulse 2s ease-in-out 3;
}

/* Loading state spinner */
.byt-chat-launcher.byt-chat-loading i.ti-message-circle {
  animation: byt-chat-spin 1s linear infinite;
}

@keyframes byt-chat-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .byt-chat-launcher {
    width: 48px;
    height: 48px;
    right: 12px;
    bottom: 65px;
  }

  .byt-chat-launcher i {
    font-size: 20px;
  }

  .byt-chat-tooltip {
    display: none;
  }
}
