
/* ---------- AI CHAT LAUNCHER (floating button) ---------- */
.ai-chat-launcher {
  position: fixed;
  bottom:127px;
  right: 11px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
/*  background: linear-gradient(135deg, #0a3a8d, #2bd4f9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);*/
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.ai-chat-launcher:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.45);
}

.ai-chat-icon {
  font-size: 22px;
}

.ai-chat-icon img{border-radius: 10px; padding: 6px;background: rgb(121 223 250 / 80%);}

/* small glowing dot to indicate "online" */
.ai-dot {
    position: absolute;
    bottom: 3px;
    right: 15px;
    width: 13px;
    height: 9px;
    border-radius: 999px;
    background: #00a2ff;
    box-shadow: 0 0 10px rgb(34 153 197 / 90%);
}

/* ---------- AI CHAT WINDOW ---------- */
.ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 550px;
  max-height: 595px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  /*transition: opacity 0.25s ease, transform 0.25s ease;*/
  z-index: 9999;
  min-height:595px;
  transform-origin: bottom right;
  transition: 
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.25s ease;
}

/* visible state */
.ai-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(0.8);
  pointer-events: auto;
}

/* header */
.ai-chat-header {
background: linear-gradient(90deg,rgba(242, 7, 7, 1) 0%, rgba(20, 6, 184, 1) 100%);
  color: #ffffff;
  padding: 14px 14px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ai-chat-title {
  font-size: 20px;
  font-weight: 600;
}

.ai-chat-sub {
  font-size: 16px;
  opacity: 0.85;line-height: 25px;
}

.ai-chat-close {
  border: none;
  background: rgba(15, 23, 42, 0.14);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top:15px;
}

/* body / messages */
.ai-chat-body {
  padding: 12px 12px 6px;
  background: #f9fafb;
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
}

.ai-msg {
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  line-height: 1.4;
  max-width: 90%;
}

.ai-msg-bot {
	font-size: 18px;
  background: #e5f0ff;
  color: #111827;
  border-bottom-left-radius: 2px;
}

.ai-msg-user {
  background: #0a3a8d;
  color: #ffffff;
  border-bottom-right-radius: 2px;
  margin-left: auto;  font-size: 18px;
}

/* input */
.ai-chat-input-wrap {
  display: flex;
  padding: 8px 8px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  gap: 6px;
}


.ai-chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 8px 12px;
  font-size: 17px;
  outline: none;
}

.ai-chat-input:focus {
  border-color: #0a3a8d;
}

.ai-chat-send {
  border-radius: 999px;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: #0a3a8d;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .ai-chat-launcher { z-index: 999; }
	.ai-chat-window {  width:360px;}
}

.ai-typing {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  background: #666;
  border-radius: 50%;
  animation: aiTyping 1.4s infinite ease-in-out both;
}

.ai-typing span:nth-child(1) { animation-delay: 0s; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiTyping {
  0% { opacity: 0.3; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-3px); }
  40% { opacity: 0.3; transform: translateY(0); }
}

.ai-msg.ai-msg-bot.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f1f1f1;
  border-radius: 10px;
  min-height: 20px;
}

.ai-msg.ai-msg-bot.ai-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #555;
  border-radius: 50%;
  animation: aiTyping 1.4s infinite ease-in-out;
}

.ai-msg.ai-msg-bot.ai-typing span:nth-child(1) {
  animation-delay: 0s;
}
.ai-msg.ai-msg-bot.ai-typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.ai-msg.ai-msg-bot.ai-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aiTyping {
  0% { transform: translateY(0); opacity: 0.3; }
  20% { transform: translateY(-4px); opacity: 1; }
  40% { transform: translateY(0); opacity: 0.3; }
}
.ai-chat-reset {
    border: none;
/*    background: rgba(15, 23, 42, 0.14);*/
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-left: 120px;
    margin-top: 10px;
}

.ai-msg-bot ul {
 padding:10px;
 margin-bottom: 1px !important;
}

@media (max-width: 900px) {
	.ai-msg-bot{font-size: 16px;}
}

/* Expand button styling */
.ai-chat-expand {
    background: transparent;
    border: none;
    color: #fff;
    margin-top: 10px;
    font-size: 26px;
    cursor: pointer;
    margin-left: 0px;
    transition: transform 0.2s ease;
}

.ai-chat-window.expanded .ai-chat-expand {
  transform: rotate(180deg); /* visual feedback */
}

/* Expanded state */
.ai-chat-window.expanded {
  width: 720px; 
  height: 590px;
  transform: scale(0.90);

}

/* ---------- AI CHAT TOOLTIP ---------- */
.ai-chat-launcher {
  position: fixed; /* already in your code, safe */
}

/* Tooltip box */
.ai-chat-launcher::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 65px;              /* shows on left of button */
  bottom: 50%;
  transform: translateY(50%) translateX(6px);
  background: #111827;      /* modern dark */
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Tooltip arrow */
.ai-chat-launcher::before {
  content: "";
  position: absolute;
  right: 54px;
  bottom: 50%;
  transform: translateY(50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent #111827;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Show tooltip on hover */
.ai-chat-launcher:hover::after,
.ai-chat-launcher:hover::before {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}

