/* === SUPPORT CHAT WIDGET === */

/* FAB button */
.support-fab {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  border: none;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,229,255,0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.support-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 32px rgba(0,229,255,0.6);
}
.support-fab svg {
  width: 28px;
  height: 28px;
  fill: white;
  transition: transform 0.3s ease;
}
.support-fab.active svg {
  transform: rotate(90deg);
}
.support-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #ff3d8a;
  border-radius: 50%;
  border: 2px solid #0a0a0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  font-weight: 700;
  animation: fabPulse 2s ease-in-out infinite;
}
@keyframes fabPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Chat panel */
.support-chat {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 380px;
  max-height: 540px;
  background: #0a0a0b;
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 20px;
  z-index: 102;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,229,255,0.08);
}
.support-chat.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.support-header {
  background: linear-gradient(135deg, rgba(0,229,255,0.1), rgba(0,229,255,0.02));
  border-bottom: 1px solid rgba(0,229,255,0.1);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.support-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.support-header-info {
  flex: 1;
}
.support-header-info h3 {
  margin: 0;
  font-size: 15px;
  color: #f0f0f5;
  font-weight: 600;
}
.support-header-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #00e5ff;
  display: flex;
  align-items: center;
  gap: 5px;
}
.support-online-dot {
  width: 6px;
  height: 6px;
  background: #00ff88;
  border-radius: 50%;
  display: inline-block;
}
.support-close {
  background: none;
  border: none;
  color: #6a6a80;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.support-close:hover {
  color: #f0f0f5;
}

/* Body */
.support-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}
.support-body::-webkit-scrollbar {
  width: 4px;
}
.support-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* Welcome message */
.support-welcome {
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.1);
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 14px 16px;
  font-size: 13px;
  color: #a0a0b8;
  line-height: 1.5;
}
.support-welcome b {
  color: #f0f0f5;
}

/* Messages */
.support-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  animation: msgIn 0.3s ease;
  word-wrap: break-word;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.support-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  color: #000;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.support-msg.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  color: #d0d0e0;
  border-bottom-left-radius: 4px;
}
.support-msg-time {
  font-size: 10px;
  opacity: 0.5;
  margin-top: 4px;
  display: block;
}

/* Support ID bar */
.support-id-bar {
  padding: 10px 16px;
  background: rgba(0,229,255,0.05);
  border-top: 1px solid rgba(0,229,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  flex-shrink: 0;
}
.support-id-label {
  color: #6a6a80;
}
.support-id-code {
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 6px;
  padding: 4px 10px;
  color: #00e5ff;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.support-id-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
  transition: transform 0.2s;
}
.support-id-copy:hover {
  transform: scale(1.2);
}

/* Form */
.support-form {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.support-form-row {
  display: flex;
  gap: 8px;
}
.support-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f0f0f5;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.support-input:focus {
  border-color: rgba(0,229,255,0.4);
}
.support-input::placeholder {
  color: #4a4a60;
}
.support-textarea {
  resize: none;
  min-height: 70px;
}
.support-send {
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  color: #000;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.support-send:hover {
  box-shadow: 0 4px 16px rgba(0,229,255,0.3);
  transform: translateY(-1px);
}
.support-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.support-send svg {
  width: 16px;
  height: 16px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: #4a4a60;
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Mobile */
@media (max-width: 480px) {
  .support-chat {
    right: 8px;
    left: 8px;
    bottom: 80px;
    width: auto;
    max-height: 70vh;
  }
  .support-fab {
    bottom: 80px;
    right: 16px;
  }
}
