/**
 * ChatKit Widget Styles
 * Generic, reusable styles for the ChatKit widget
 */

/* Chat Screen - Expands to fill screen */
.chatkit-widget-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 1500;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transform-origin: center center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.chatkit-widget-screen.chatkit-widget-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.chatkit-widget-screen.chatkit-widget-hidden {
  /* Use visibility and opacity instead of display: none
       to allow ChatKit to initialize in background */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  /* Keep it off-screen but still in DOM */
  transform: scale(0.01) translateY(100vh);
}

.chatkit-widget-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  animation: chatkit-widget-expandIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatkit-widget-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #9ca3af;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chatkit-widget-close:hover {
  background: #ffffff;
  color: #000000;
  transform: scale(1.1);
}

.chatkit-widget-content {
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
}

.chatkit-widget-content openai-chatkit {
  display: block;
  width: 100%;
  height: 100%;
}

/* Animations */
@keyframes chatkit-widget-expandIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Body class when chat is active */
body.chatkit-widget-active {
  overflow: hidden;
}

.hide-thread {
  width: 440px;
  height: 50px;
  position: absolute;
  background-color: white;
  top: 14px;
  z-index: 3000;
  color: #5d5d5d;
  font-size: 16px;
  padding-left: 24px;
  padding-top: 6px;
}
