/* ============================================================
   AI Chatbot Widget Styling - Golden Dreams Custom Name Locket
   ============================================================ */

.ai-chat-trigger {
  position: fixed;
  bottom: 16px;
  left: 14px;
  z-index: 180;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0b1220 0%, #1e1b4b 100%);
  color: #fff;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 20px rgba(11, 18, 32, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Hind Siliguri', system-ui, sans-serif;
  user-select: none;
}

.ai-chat-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 25px rgba(11, 18, 32, 0.4);
  border-color: #fbbf24;
}

.ai-chat-avatar-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
  flex-shrink: 0;
}

.ai-chat-avatar-wrap svg {
  width: 14px;
  height: 14px;
}

.ai-chat-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #0b1220;
}

.ai-chat-trigger-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.ai-chat-trigger-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.ai-chat-trigger-sub {
  font-size: 9.5px;
  color: #fbbf24;
  font-weight: 600;
}

.ai-chat-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #0b1220;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* ==========================================
   Chat Window Drawer
   ========================================== */
.ai-chat-window {
  position: fixed;
  bottom: 84px;
  left: 20px;
  z-index: 190;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(11, 18, 32, 0.28), 0 0 1px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Hind Siliguri', system-ui, sans-serif;
}

.ai-chat-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Chat Header */
.ai-chat-header {
  background: linear-gradient(135deg, #0b1220 0%, #171025 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.ai-chat-header-titles h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.ai-chat-header-titles p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.ai-chat-btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Chat Messages Container */
.ai-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.ai-chat-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: chat-fade-in 0.25s ease-out forwards;
}

@keyframes chat-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg.bot {
  align-self: flex-start;
}

.ai-chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b1220, #1e1b4b);
  color: #fbbf24;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.ai-chat-msg-bubble {
  padding: 12px 15px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.55;
  word-break: break-word;
}

.ai-chat-msg.bot .ai-chat-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border-top-left-radius: 4px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  border: 1px solid #e2e8f0;
}

.ai-chat-msg.user .ai-chat-msg-bubble {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
  font-weight: 500;
}

/* Quick Action Chips */
.ai-chat-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.ai-chat-chip {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-chat-chip:hover {
  background: #be123c;
  color: #ffffff;
  border-color: #be123c;
  transform: translateY(-1px);
}

.ai-chat-chip.primary {
  background: linear-gradient(135deg, #16a34a, #059669);
  color: #ffffff;
  border: 0;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.ai-chat-chip.primary:hover {
  background: linear-gradient(135deg, #15803d, #047857);
}

/* Structured Card Inside Chat */
.ai-chat-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 14px;
  margin-top: 8px;
  font-size: 13.5px;
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.ai-chat-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-chat-card-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #fcd34d;
}

.ai-chat-card-row:last-child {
  border-bottom: 0;
  padding-top: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #be123c;
}

.ai-chat-card-row span:first-child {
  color: #64748b;
}

/* Status Indicator Card */
.ai-chat-status-card {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 16px;
  padding: 14px;
  margin-top: 8px;
  color: #065f46;
}

.ai-chat-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #10b981;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 8px;
}

/* Chat Input Bar */
.ai-chat-footer {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 11px 15px;
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
  color: #0b1220;
}

.ai-chat-input:focus {
  background: #ffffff;
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.ai-chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  flex-shrink: 0;
}

.ai-chat-send-btn:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #f43f5e, #be123c);
}

.ai-chat-send-btn svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

/* Responsive adjustments */
@media (max-width: 680px) {
  .ai-chat-trigger {
    left: 12px;
    bottom: 80px;
    padding: 8px 14px 8px 10px;
  }
  .ai-chat-trigger-sub {
    display: none;
  }
  .ai-chat-window {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    height: min(580px, 86vh);
    border-radius: 20px;
  }
}
