/* Chat Widget Styles */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #007bff;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.chat-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.chat-button i {
  font-size: 24px;
}

.chat-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 450px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
}

.chat-container.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  background-color: #007bff;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f8f9fa;
}

.chat-message {
  margin-bottom: 15px;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  word-wrap: break-word;
}

.chat-message.user {
  background-color: #e9ecef;
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

.chat-message.admin {
  background-color: #007bff;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.chat-message .timestamp {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 5px;
  text-align: right;
}

.chat-message.admin .timestamp {
  color: rgba(255, 255, 255, 0.7);
}

.chat-input-container {
  padding: 15px;
  background-color: #fff;
  border-top: 1px solid #dee2e6;
}

.chat-input-form {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid #ced4da;
  outline: none;
}

.chat-send-button {
  background-color: #007bff !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
  font-size: 18px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
  min-width: 40px !important;
  min-height: 40px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.chat-send-button:hover {
  background-color: #0056b3 !important;
}

.chat-send-button:disabled {
  background-color: #6c757d !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.chat-send-button:not(:disabled) {
  background-color: #007bff !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

.chat-send-button i {
  font-size: 18px;
}

.chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

.chat-welcome {
  text-align: center;
  padding: 20px;
  color: #6c757d;
}

.chat-welcome h4 {
  margin-bottom: 10px;
  color: #343a40;
}

.chat-welcome p {
  margin-bottom: 15px;
}

.chat-welcome-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-welcome-form input {
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 5px;
}

.chat-welcome-form button {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.chat-welcome-form button:hover {
  background-color: #0056b3;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .chat-container {
    background-color: #343a40;
  }
  
  .chat-messages {
    background-color: #212529;
  }
  
  .chat-message.user {
    background-color: #495057;
    color: #f8f9fa;
  }
  
  .chat-input-container {
    background-color: #343a40;
    border-top: 1px solid #495057;
  }
  
  .chat-input {
    background-color: #212529;
    border: 1px solid #495057;
    color: #f8f9fa;
  }
  
  .chat-welcome {
    color: #adb5bd;
  }
  
  .chat-welcome h4 {
    color: #f8f9fa;
  }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  .chat-container {
    width: calc(100% - 40px);
    height: 400px;
    bottom: 80px;
  }
  
  .chat-button {
    width: 50px;
    height: 50px;
  }
  
  .chat-button i {
    font-size: 20px;
  }
}
