/* ===================================================================
   EVSUN NAKLİYAT - AKILLI CHATBOT VE CANLI ASİSTAN STİLLERİ
   =================================================================== */

.chatbot-wrapper {
  position: fixed;
  bottom: 90px;
  right: 25px;
  z-index: 10001;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Chat Toggle Button */
.chatbot-trigger {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 3px solid rgba(255, 255, 255, 0.25);
  color: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.chatbot-trigger:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.6);
}

.chatbot-trigger i {
  font-size: 1.7rem;
  transition: transform 0.3s ease;
}

.chatbot-trigger.active i.fa-comments {
  display: none;
}

.chatbot-trigger.active i.fa-xmark {
  display: block !important;
}

.chatbot-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  animation: chatPulse 2s infinite;
  pointer-events: none;
}

@keyframes chatPulse {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chatbot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b132b;
}

/* Tooltip message bubble */
.chatbot-bubble-tip {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 240px;
  background: #111c38;
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.82rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideBubble 0.5s ease-out;
}

.chatbot-bubble-tip strong {
  color: #fbbf24;
  display: block;
  margin-bottom: 3px;
}

.chatbot-bubble-tip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #111c38;
}

@keyframes slideBubble {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Main Chatbot Window */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 540px;
  max-width: calc(100vw - 32px);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
}

.chatbot-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chatbot Header */
.chatbot-header {
  background: linear-gradient(135deg, #1e293b, #0b132b);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chatbot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 1.3rem;
  position: relative;
}

.online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #1e293b;
  border-radius: 50%;
}

.chatbot-header-text h4 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.chatbot-header-text p {
  margin: 2px 0 0 0;
  color: #10b981;
  font-size: 0.74rem;
  font-weight: 600;
}

.chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-header-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.chatbot-header-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.chatbot-header-btn.wa-direct {
  background: #25d366;
  color: #fff;
}

.chatbot-header-btn.wa-direct:hover {
  background: #20ba5a;
}

/* Chatbot Body / Messages */
.chatbot-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #090e1a;
}

.chatbot-body::-webkit-scrollbar {
  width: 5px;
}

.chatbot-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 86%;
  animation: fadeInMsg 0.3s ease;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

.msg-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.chat-msg.bot .msg-bubble {
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 600;
  border-bottom-right-radius: 4px;
}

.chat-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.chat-chip-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-chip-btn:hover {
  background: #f59e0b;
  color: #0f172a;
  transform: translateX(3px);
}

/* Chat Result Card (WhatsApp Bridge) */
.chat-result-card {
  background: #111c38;
  border: 1.5px solid #25d366;
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
}

.chat-result-card h5 {
  color: #25d366;
  margin: 0 0 6px 0;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-result-card p {
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.chat-wa-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: #ffffff;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.chat-wa-send-btn:hover {
  background: #20ba5a;
}

/* Chat Footer / Input */
.chatbot-footer {
  padding: 12px 14px;
  background: #111c38;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 10px 16px;
  color: #f8fafc;
  font-size: 0.84rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.chatbot-input:focus {
  border-color: #f59e0b;
}

.chatbot-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f59e0b;
  border: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.chatbot-send-btn:hover {
  background: #fbbf24;
  transform: scale(1.06);
}

@media (max-width: 768px) {
  .chatbot-bubble-tip {
    display: none !important;
  }
  .chatbot-wrapper {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    z-index: 10005 !important;
  }
  .chatbot-trigger {
    width: 52px !important;
    height: 52px !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45) !important;
  }
  .chatbot-trigger i {
    font-size: 1.35rem !important;
  }
  .chatbot-window {
    width: calc(100vw - 28px) !important;
    height: calc(100dvh - 160px) !important;
    max-height: 480px !important;
    right: -4px !important;
    bottom: 64px !important;
    border-radius: 16px !important;
    z-index: 10006 !important;
  }
}

body.chatbot-open .mobile-bottom-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(100%) !important;
  transition: transform 0.25s ease, opacity 0.2s ease !important;
}

body.drawer-open .chatbot-wrapper {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease !important;
}

@keyframes typingBlink {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
