/* Support Chat Widget Styles */
.support-chat-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #44EC9F 0%, #88FFC8 100%);
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(68, 236, 159, 0.4);
  z-index: 9998;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseChat 2s ease-in-out infinite;
}

/* Online Status Badge */
.support-chat-online-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: #00ff00;
  border: 3px solid white;
  border-radius: 50%;
  animation: pulseOnline 1.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulseOnline {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 255, 0, 0);
  }
}

/* Tooltip Hint */
.support-chat-tooltip {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: white;
  color: #333;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 9997;
  max-width: 280px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
  animation: slideInTooltip 0.5s ease 2s forwards;
}

@keyframes slideInTooltip {
  to {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.support-chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 25px;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.05);
}

.support-chat-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  color: #44EC9F;
}

.support-chat-tooltip-icon {
  font-size: 20px;
  animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-20deg); }
}

.support-chat-tooltip-text {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 10px;
}

.support-chat-tooltip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #44EC9F 0%, #88FFC8 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.support-chat-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.support-chat-tooltip-close:hover {
  background: #f0f0f0;
  color: #333;
}

.support-chat-tooltip-close:active {
  background: #e0e0e0;
  transform: scale(0.95);
}

.support-chat-tooltip.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  display: none !important;
}

@keyframes pulseChat {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(68, 236, 159, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 30px rgba(68, 236, 159, 0.6);
    transform: scale(1.05);
  }
}

.support-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(68, 236, 159, 0.6);
  animation: none;
}

.support-chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #FF4141;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.support-chat-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 340px;
  height: 480px;
  background: linear-gradient(135deg, 
    rgba(26, 40, 80, 0.95) 0%, 
    rgba(10, 22, 48, 0.98) 100%
  );
  border: 1px solid rgba(68, 236, 159, 0.3);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.support-chat-header {
  background: linear-gradient(135deg, 
    rgba(68, 236, 159, 0.15) 0%, 
    rgba(217, 70, 181, 0.15) 100%
  );
  backdrop-filter: blur(10px);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(68, 236, 159, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.support-chat-header .header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(68, 236, 159, 0.6);
  box-shadow: 
    0 0 20px rgba(68, 236, 159, 0.4),
    0 0 0 4px rgba(68, 236, 159, 0.1);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(68, 236, 159, 0.2), rgba(217, 70, 181, 0.2));
}

.support-chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-chat-header h3 {
  margin: 0;
  font-size: 15px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1) 0%,
    rgba(68, 236, 159, 1) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  filter: drop-shadow(0 0 10px rgba(68, 236, 159, 0.3));
}

.support-chat-status {
  margin: 5px 0 0 0;
  font-size: 12px;
  color: #44EC9F;
  display: flex;
  align-items: center;
  gap: 5px;
}

.support-chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #44EC9F;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.support-chat-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.support-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(10, 22, 48, 0.3);
}

.support-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.support-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.support-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(68, 236, 159, 0.3);
  border-radius: 10px;
}

.support-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(68, 236, 159, 0.5);
}

.support-chat-welcome {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.support-chat-admin-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #44EC9F;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(68, 236, 159, 0.3);
}

.support-chat-admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-chat-message-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.support-chat-message-wrapper.admin {
  align-self: flex-start;
  max-width: 85%;
}

.support-chat-message {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.support-chat-message.admin {
  background: linear-gradient(135deg, 
    rgba(68, 236, 159, 0.15) 0%, 
    rgba(26, 40, 80, 0.7) 100%
  );
  align-self: flex-start;
  border: 1px solid rgba(68, 236, 159, 0.25);
  box-shadow: 
    0 4px 15px rgba(68, 236, 159, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.support-chat-message.user {
  background: linear-gradient(135deg, 
    rgba(217, 70, 181, 0.15) 0%, 
    rgba(26, 40, 80, 0.7) 100%
  );
  align-self: flex-end;
  border: 1px solid rgba(217, 70, 181, 0.25);
  box-shadow: 
    0 4px 15px rgba(217, 70, 181, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.support-chat-message strong {
  display: block;
  margin-bottom: 5px;
  color: #44EC9F;
  font-size: 13px;
  font-weight: 600;
}

.support-chat-message p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.4;
}

.support-chat-time {
  display: block;
  font-size: 10px;
  color: var(--text-dark);
  margin-top: 5px;
  text-align: right;
}

.support-chat-input-container {
  padding: 14px;
  border-top: 1px solid rgba(68, 236, 159, 0.2);
  background: linear-gradient(135deg, 
    rgba(10, 22, 48, 0.95) 0%, 
    rgba(26, 40, 80, 0.9) 100%
  );
  backdrop-filter: blur(10px);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05) inset;
}

.support-chat-user-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-chat-user-form input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(26, 40, 80, 0.6);
  border: 1px solid rgba(68, 236, 159, 0.25);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 13px;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
}

.support-chat-user-form input:focus {
  outline: none;
  border-color: #44EC9F;
  background: rgba(26, 40, 80, 0.8);
  box-shadow: 
    0 0 15px rgba(68, 236, 159, 0.3),
    0 0 0 3px rgba(68, 236, 159, 0.1);
}

.support-chat-user-form button {
  padding: 10px 18px;
  background: linear-gradient(135deg, #44EC9F 0%, #88FFC8 100%);
  border: none;
  border-radius: 10px;
  color: #0A1630;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 
    0 4px 15px rgba(68, 236, 159, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.support-chat-user-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(68, 236, 159, 0.4);
}

.support-chat-input-wrapper {
  display: flex;
  gap: 10px;
}

.support-chat-input-wrapper input {
  flex: 1;
  padding: 12px;
  background: rgba(26, 40, 80, 0.6);
  border: 1px solid rgba(68, 236, 159, 0.3);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 14px;
}

.support-chat-input-wrapper input:focus {
  outline: none;
  border-color: #44EC9F;
}

.support-chat-input-wrapper button {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #44EC9F 0%, #88FFC8 100%);
  border: none;
  border-radius: 8px;
  color: #0A1630;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.support-chat-input-wrapper button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(68, 236, 159, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .support-chat-window {
    width: calc(100% - 20px);
    height: calc(100% - 120px);
    right: 10px;
    bottom: 90px;
  }

  .support-chat-button {
    bottom: 20px;
    right: 20px;
  }
}
