/* ChatKit Embedded Widget */

/* Chat Icon (Floating Button) */
.chatkit-icon {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 999;
  user-select: none;
  padding: 0;
}

.chatkit-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.chatkit-icon img {
  width: 28px;
  height: 28px;
}

/* Modal Overlay */
.chatkit-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.chatkit-overlay.active {
  display: block;
}

/* Modal Container */
.chatkit-modal {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 90%;
  max-width: 450px;
  height: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  z-index: 1001;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.chatkit-modal.active {
  display: flex;
}

/* Modal Header */
.chatkit-modal-header {
  display: none;
}

.chatkit-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chatkit-modal-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.chatkit-modal-close:hover {
  opacity: 0.8;
}

/* Modal Content (ChatKit Container) */
.chatkit-modal-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.chatkit-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  font-size: 14px;
}

.chatkit-loading::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  background: #3b82f6;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

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

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

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

/* Responsive */
@media (max-width: 600px) {
  .chatkit-modal {
    width: calc(100% - 32px);
    height: calc(100vh - 140px);
    max-width: none;
  }

  .chatkit-icon {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .chatkit-icon img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 400px) {
  .chatkit-modal {
    bottom: 80px;
    height: calc(100vh - 120px);
  }
}
