/* ═══════════════════════════════════════════════════════════
   SHEINPROXY — Chat Styles
   ═══════════════════════════════════════════════════════════ */

/* Chat Button */
.chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--clr-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-btn:hover {
  background: var(--clr-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Chat Modal Overlay */
.chat-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.chat-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
}

.chat-overlay.closing {
  opacity: 0;
}

/* Chat Window */
.chat-window {
  width: 100%;
  max-width: 600px;
  height: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--clr-primary, #1E293B);
  color: white;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-header-text h3 {
  margin: 0;
  font-size: 16px;
}

.chat-header-text p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.chat-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* Message Bubble */
.message {
  display: flex;
  gap: 10px;
  max-width: 75%;
  animation: fadeIn 0.3s;
}

.message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--clr-primary, #1E293B);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.message.sent .message-avatar {
  background: var(--clr-accent);
}

.message-content {
  flex: 1;
}

.message-bubble {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.sent .message-bubble {
  background: var(--clr-accent);
  color: white;
}

.message-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  cursor: pointer;
}

.message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.message.sent .message-time {
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  padding: 12px 20px;
  background: white;
  font-size: 13px;
  color: #666;
  align-items: center;
  gap: 8px;
}

.typing-indicator.active {
  display: flex;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Chat Input */
.chat-input-container {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
}

.chat-input-actions {
  display: flex;
  gap: 8px;
}

.chat-input-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.chat-input-btn:hover {
  background: #f5f5f5;
  border-color: var(--clr-accent);
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
}

.chat-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  max-height: 100px;
}

.chat-input:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--clr-accent);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.chat-send-btn:hover {
  background: var(--clr-accent-dark);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Empty State */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  gap: 12px;
}

.chat-empty-icon {
  font-size: 64px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-window {
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .message {
    max-width: 85%;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
