/* -----------------------
   Chat Container
----------------------- */

/* Close button */
#chat-header .close-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #fff;
  z-index: 1001;
}

/* Toggle button */
#chat-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #7c3aed);
  color: #fff;
  font-size: 22px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 1001;
}

/* chat_container.css */


#chat-container:not(.collapsed) {
  transform: translateY(0);
  opacity: 1;
}

#chat-container iframe {
  width: 100%;
  height: calc(100% - 40px); /* subtract header height */
  border: none;
  display: block;
}

#chat-header {
  height: 40px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-weight: bold;
}

#chat-header .close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

#chat-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 360px;
  height: 520px;
  max-width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9998;
  background: rgb(143 143 236 / 50%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  transform-origin: bottom right;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.3s ease;
  backdrop-filter: blur(12px);
  font-family: 'Inter', sans-serif;
}

/* Collapsed state */
#chat-container.collapsed {
  display: none;
}

/* Header */
#chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #f0f0f5;
}


#chat-header .close-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* Iframe */
#chat-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent !important;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 0 16px 16px;
}



/* Hide toggle when chat open */
#chat-toggle.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 520px) {
  #chat-container { width: auto; left: 1rem; right: 1rem; height: 60vh; bottom: 1rem; }
  #chat-toggle { right: 1rem; bottom: 1rem; }
}

