/* --- Root Container --- */
.plasnomic-ai-root {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  transform: none !important;
  opacity: 1 !important;
  transition: all 0.3s ease !important;
  font-family: Inter, system-ui, sans-serif;
}

/* --- Floating Open Button --- */
#plasnomic-open {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 179, 255, 0.25);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
}
#plasnomic-open:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 36px rgba(0, 179, 255, 0.35);
}

/* --- Chat Window --- */
#plasnomic-widget {
  position: fixed !important;
  bottom: 90px !important;
  right: 24px !important;
  width: 360px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999 !important;
}

/* --- Header --- */
.plasnomic-header {
  background: linear-gradient(135deg, #00b4db, #0083b0);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

/* --- Messages Area --- */
#plasnomic-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* keeps messages at the bottom */
  min-height: 120px; /* adjust for small screens */
	


}




#plasnomic-widget {
  position: fixed !important;
  bottom: 90px !important;
  right: 24px !important;
  width: 360px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999 !important;
}

#plasnomic-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* was flex-end — fixed */
  align-items: flex-start; /* ensures bubbles align properly */
  background: #fafafa;
  scroll-behavior: smooth;
}







/* --- Input Row --- */
.plasnomic-input-row {
  padding: 10px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  background: #fff;
}
.plasnomic-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}
.plasnomic-send {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00b4db, #0083b0);
  color: #fff;
  cursor: pointer;
}

/* --- Message Bubbles --- */
.plasnomic-msg {
  margin: 8px 0;
  display: flex;
}
.plasnomic-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.plasnomic-user {
  justify-content: flex-end;
}
.plasnomic-user .plasnomic-bubble {
  background: linear-gradient(135deg, #1e88e5, #43a047);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.plasnomic-bot {
  justify-content: flex-start;
}
.plasnomic-bot .plasnomic-bubble {
  background: #fff;
  border: 1px solid #eef2f7;
  color: #111;
  border-bottom-left-radius: 4px;
}

/* --- Typing Indicator --- */
.plasnomic-typing {
  display: flex;
  gap: 6px;
  align-items: center;
}
.plasnomic-typing span {
  width: 6px;
  height: 6px;
  background: #0083b0;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  #plasnomic-widget {
    width: 92vw;
    height: 78vh;
    right: 4vw !important;
    bottom: 18px !important;
    border-radius: 12px;
  }
  #plasnomic-open {
    width: 56px;
    height: 56px;
  }
}
