.support-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.support-popup.active {
  display: flex;
}

.support-popup-content {
  background: #1e293b;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.support-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.support-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.support-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.support-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #334155;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.online {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.chat-container {
  margin-bottom: 20px;
}

.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
  padding: 10px;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #334155;
}

.message {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.message.user {
  align-items: flex-end;
}

.message.agent {
  align-items: flex-start;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
}

.message.user .message-content {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.agent .message-content {
  background: #334155;
  color: white;
  border-bottom-left-radius: 4px;
}

.message-content p {
  margin: 0 0 5px 0;
  line-height: 1.4;
  white-space: pre-line;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  display: block;
}

.chat-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #334155;
  border-radius: 25px;
  background: #0f172a;
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.chat-input input:focus {
  border-color: #2563eb;
}

.chat-input input::placeholder {
  color: #64748b;
}

.chat-input button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  min-width: 44px;
  height: 44px;
}

.chat-input button:hover {
  transform: scale(1.05);
}

.quick-actions {
  border-top: 1px solid #334155;
  padding-top: 20px;
}

.quick-actions h4 {
  margin: 0 0 15px 0;
  color: #e2e8f0;
  font-size: 14px;
}

.quick-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-btn {
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  transition: all 0.3s;
  text-align: left;
}

.quick-btn:hover {
  background: #1e293b;
  border-color: #2563eb;
  transform: translateY(-2px);
}

.quick-btn .material-icons {
  font-size: 16px;
  color: #2563eb;
}

/* Responsive Design for Support Popup */
@media (max-width: 768px) {
  .support-popup-content {
    width: 95%;
    max-height: 90vh;
    margin: 10px;
  }
  
  .support-body {
    padding: 15px;
    max-height: 70vh;
  }
  
  .quick-buttons {
    grid-template-columns: 1fr;
  }
  
  .chat-messages {
    max-height: 250px;
  }
  
  .message-content {
    max-width: 90%;
  }
}

/* Scrollbar Styling for Chat */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Typing Indicator Animation */
.typing-indicator .message-content {
  background: #334155 !important;
  padding: 12px 16px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ====== Order Page Styles ====== */

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}
/* btn support */
.support-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #2563eb;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.support-float:hover {
  transform: scale(1.1);
  background-color: #2563eb;
}
