/* ============================================================
   SASTRA Chat Widget Styles
   ============================================================ */

#chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: 'DM Sans', sans-serif;
}

#chat-trigger-container {
  position: relative;
  width: 90px;
  height: 90px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

#chat-trigger-container svg {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: spin-text 10s linear infinite;
}

#chat-trigger {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s infinite;
  z-index: 2;
}

#chat-window {
  display: none;
  position: absolute;
  bottom: 100px;
  right: 0;
  width: 340px;
  height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  flex-direction: column;
}

.chat-header {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  padding: 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-icon { font-size: 20px; }

#close-chat {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 0.95rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-input-area {
  padding: 15px;
  border-top: 1px solid #e2e8f0;
  background: white;
  display: flex;
  gap: 8px;
}

#user-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  outline: none;
  font-family: inherit;
}

#send-btn {
  background: #1d4ed8;
  color: white;
  border: none;
  padding: 0 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.2s;
}

#send-btn:hover { background: #1e40af; }

/* Chat bubbles */
.chat-bubble {
  padding: 10px 16px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 0.95rem;
  word-wrap: break-word;
}

.chat-bubble--user {
  background: #1d4ed8;
  color: white;
  border-radius: 12px 12px 0 12px;
  align-self: flex-end;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-bubble--bot {
  background: white;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  border-radius: 12px 12px 12px 0;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

#bot-welcome {
  background: white;
  padding: 12px 16px;
  border-radius: 12px 12px 12px 0;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  align-self: flex-start;
  max-width: 85%;
}

/* Keyframes */
@keyframes spin-text {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%   { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.6); }
  70%  { box-shadow: 0 0 0 15px rgba(29, 78, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0); }
}
