﻿/* ======================================================
   AI RECEPTIONIST (DINA AI) - MODERN FLOATING CHAT WIDGET
   ====================================================== */

/* Floating Button Trigger */
.dina-ai-widget-wrapper {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 999999;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.dina-ai-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  padding: 10px 20px 10px 12px;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4), 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  text-decoration: none;
}
.dina-ai-launcher:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.55);
}

.dina-ai-avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.dina-ai-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dina-ai-online-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: dinaPulse 2s infinite;
}
@keyframes dinaPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.dina-ai-launcher-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}
.dina-ai-launcher-title {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.dina-ai-launcher-sub {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 500;
}

/* Chat Window Box */
.dina-chat-window {
  display: none;
  position: fixed;
  bottom: 85px;
  left: 25px;
  width: 380px;
  max-width: calc(100vw - 30px);
  height: 560px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  flex-direction: column;
  z-index: 999999;
  animation: dinaSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.dina-chat-window.show {
  display: flex;
}
@keyframes dinaSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
.dina-chat-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}
.dina-header-bot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dina-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  position: relative;
}
.dina-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dina-header-avatar .dina-ai-online-dot {
  width: 11px;
  height: 11px;
}
.dina-header-title {
  font-weight: 700;
  font-size: 14.5px;
  margin: 0;
  color: #ffffff;
}
.dina-header-status {
  font-size: 11px;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.dina-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dina-btn-icon {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.dina-btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* Chat Messages Body */
.dina-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.dina-chat-body::-webkit-scrollbar {
  width: 5px;
}
.dina-chat-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* Message Bubbles */
.dina-msg {
  display: flex;
  gap: 8px;
  max-width: 86%;
  animation: dinaFadeIn 0.25s ease forwards;
}
@keyframes dinaFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dina-msg.bot {
  align-self: flex-start;
}
.dina-msg.bot .dina-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: #4338ca;
  margin-top: 4px;
}
.dina-msg.bot .dina-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 4px 18px 18px 18px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.dina-msg.bot .dina-msg-bubble p:last-child {
  margin-bottom: 0;
}
.dina-msg.bot .dina-msg-bubble ul,
.dina-msg.bot .dina-msg-bubble ol {
  margin: 6px 0;
  padding-left: 18px;
}
.dina-msg.bot .dina-msg-bubble li {
  margin-bottom: 4px;
}

.dina-msg.user {
  align-self: flex-end;
}
.dina-msg.user .dina-msg-bubble {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  border-radius: 18px 4px 18px 18px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Typing Indicator */
.dina-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px 18px 18px 18px;
  width: fit-content;
}
.dina-typing-dot {
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
  animation: dinaTyping 1.4s infinite ease-in-out;
}
.dina-typing-dot:nth-child(1) { animation-delay: 0s; }
.dina-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.dina-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dinaTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Quick Suggestions */
.dina-suggestions-box {
  padding: 8px 14px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.dina-suggestions-box::-webkit-scrollbar {
  display: none;
}
.dina-chip {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.dina-chip:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

/* Footer Input Area */
.dina-chat-footer {
  padding: 10px 14px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}
.dina-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dina-input-text {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 25px;
  padding: 9px 16px;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}
.dina-input-text:focus {
  border-color: #3b82f6;
  background: #ffffff;
}
.dina-btn-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.dina-btn-send:hover:not(:disabled) {
  transform: scale(1.08);
}
.dina-btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dina-footer-note {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 0;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .dina-chat-window {
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}
