
.chat-float-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #656f77;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(101, 111, 119, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
}

.chat-float-button:hover {
  transform: scale(1.1);
  background: #4a5259;
  box-shadow: 0 6px 20px rgba(74, 82, 89, 0.6);
}

.chat-float-button:active {
  transform: scale(0.95);
}

.chat-float-button svg {
  width: 28px;
  height: 28px;
  color: white;
}

.chat-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.chat-widget-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget-container.active {
  display: flex;
  transform: scale(1) translateY(0);
  opacity: 1;
}

.chat-widget-header {
  background: linear-gradient(135deg, #4a5259 0%, #3d444a 100%);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.chat-widget-header-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

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

.chat-widget-header-text p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.chat-widget-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.chat-initial-form {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.chat-initial-form h4 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 18px;
}

.chat-initial-form p {
  margin: 0 0 16px 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.chat-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.chat-form-group input,
.chat-form-group textarea {
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s;
}

.chat-form-group input:focus,
.chat-form-group textarea:focus {
  outline: none;
  border-color: #4a5259;
}

.chat-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.chat-start-button {
  background: linear-gradient(135deg, #4a5259 0%, #3d444a 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.chat-start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.chat-start-button:active {
  transform: translateY(0);
}

.chat-start-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f9fafb;
}

.chat-message {
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

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

.chat-message.sent {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.chat-message.sent .chat-message-avatar {
  background: #4a5259;
  color: white;
}

.chat-message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.sent .chat-message-bubble {
  background: linear-gradient(135deg, #4a5259 0%, #3d444a 100%);
  color: white;
}

.chat-message-sender {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #6b7280;
}

.chat-message.sent .chat-message-sender {
  color: rgba(255, 255, 255, 0.9);
}

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

.chat-message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-message.sent .chat-message-time {
  color: rgba(255, 255, 255, 0.8);
  justify-content: flex-end;
}

.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  width: fit-content;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-typing-indicator span {
  font-size: 13px;
  color: #6b7280;
}

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

.chat-typing-dots div {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chat-input-container {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 24px;
  padding: 8px 16px;
  gap: 8px;
}

.chat-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
}

.chat-send-button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #4a5259 0%, #3d444a 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.chat-send-button:active {
  transform: scale(0.95);
}

.chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-connection-status {
  padding: 8px 16px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  text-align: center;
  display: none;
}

.chat-connection-status.show {
  display: block;
}

.chat-connection-status.error {
  background: #fee2e2;
  color: #991b1b;
}

.chat-connection-status.success {
  background: #d1fae5;
  color: #065f46;
}

.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #9ca3af;
}

.chat-empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-empty-state p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 480px) {
  .chat-widget-container {
    width: calc(100vw - 32px);
    height: calc(100vh - 140px);
    right: 16px;
    bottom: 90px;
  }
  
  .chat-float-button {
    right: 16px;
    bottom: 16px;
  }
}

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

.chat-messages-container::-webkit-scrollbar-track {
  background: #f3f4f6;
}

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

.chat-messages-container::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}



