/* =========================
   AGNI CHATBOT WIDGET - STYLES
========================= */

:root {
  --agni-navy: #0b1f3a;
  --agni-blue: #2563eb;
  --agni-cyan: #06b6d4;
  --agni-orange: #f97316;
  --agni-red: #ef4444;
  --agni-light: #f8fafc;
  --agni-text: #0f172a;
  --agni-muted: #64748b;
  --agni-border: #e2e8f0;
}

#agni-widget,
#agni-widget * {
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

/* Sits above the site's floating WhatsApp / Call / Consultation buttons */
#agni-widget {
  position: fixed;
  right: 20px;
  bottom: 170px;
  z-index: 99999;
}

/* Floating button */
.agni-launcher {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--agni-orange), var(--agni-red));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.agni-launcher:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 35px rgba(239, 68, 68, 0.45);
}

.agni-launcher svg {
  width: 31px;
  height: 31px;
}

.agni-launcher::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid white;
}

/* Chat box */
.agni-chatbox {
  width: 370px;
  height: 570px;
  position: absolute;
  right: 0;
  bottom: 80px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border: 1px solid var(--agni-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.agni-chatbox.agni-open {
  display: flex;
  animation: agni-slide-up 0.25s ease;
}

@keyframes agni-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.agni-header {
  padding: 17px 18px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--agni-navy), #123b70);
}

.agni-brand {
  display: flex;
  gap: 11px;
  align-items: center;
}

.agni-logo {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--agni-orange), var(--agni-red));
}

.agni-logo svg {
  width: 25px;
  height: 25px;
}

.agni-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.agni-status {
  font-size: 12px;
  margin-top: 3px;
  opacity: 0.82;
}

.agni-close {
  color: white;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

/* Messages */
.agni-messages {
  flex: 1;
  overflow-y: auto;
  padding: 17px 14px;
  background: var(--agni-light);
}

.agni-message {
  display: flex;
  margin: 9px 0;
}

.agni-message.agni-user {
  justify-content: flex-end;
}

.agni-bubble {
  max-width: 84%;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--agni-text);
  background: white;
  border: 1px solid var(--agni-border);
  border-radius: 14px 14px 14px 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.agni-user .agni-bubble {
  color: white;
  background: var(--agni-blue);
  border: 0;
  border-radius: 14px 14px 4px 14px;
}

.agni-time {
  color: var(--agni-muted);
  font-size: 10px;
  margin: 4px 5px 0;
}

/* Quick questions */
.agni-quick {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 13px;
  background: white;
  border-top: 1px solid var(--agni-border);
}

.agni-quick button {
  flex: 0 0 auto;
  cursor: pointer;
  color: var(--agni-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 30px;
  padding: 7px 10px;
  font-size: 11px;
}

.agni-quick button:hover {
  background: #dbeafe;
}

/* Input area */
.agni-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--agni-border);
}

.agni-input {
  flex: 1;
  margin: 0;
  min-width: 0;
  resize: none;
  outline: none;
  border: 1px solid var(--agni-border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  color: var(--agni-text);
}

.agni-input:focus {
  border-color: var(--agni-blue);
}

.agni-send {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  background: var(--agni-blue);
}

.agni-send:hover {
  background: #1d4ed8;
}

.agni-send svg {
  width: 18px;
  height: 18px;
}

.agni-powered {
  color: var(--agni-muted);
  background: white;
  text-align: center;
  font-size: 10px;
  padding-bottom: 8px;
}

@media (max-width: 520px) {
  /* On mobile the site shows a bottom action bar, so lift the launcher above it */
  #agni-widget {
    right: 14px;
    bottom: 76px;
  }

  .agni-chatbox {
    width: calc(100vw - 28px);
    height: min(570px, calc(100vh - 190px));
    right: 0;
    bottom: 76px;
    border-radius: 17px;
  }

  .agni-launcher {
    width: 58px;
    height: 58px;
  }
}
