/**
 * GÜZ TUR - GÜZ AI Yapay Zeka Asistanı Stilleri
 */

/* ==========================================================================
   1. GÜZ AI LAUNCHER (KAYAN BUTON)
   ========================================================================== */
.guz-ai-launcher {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #071E32 0%, #0F3759 100%);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 107, 22, 0.4);
  border-radius: 999px;
  padding: 8px 18px 8px 10px;
  box-shadow: 0 8px 28px rgba(7, 30, 50, 0.35), 0 0 15px rgba(255, 107, 22, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}

.guz-ai-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(7, 30, 50, 0.45), 0 0 22px rgba(255, 107, 22, 0.4);
  border-color: #FF6B16;
}

.guz-ai-launcher .launcher-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #FF6B16 0%, #FFA84A 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(255, 107, 22, 0.5);
}

.guz-ai-launcher .launcher-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #10B981;
  border: 2px solid #071E32;
  border-radius: 50%;
  animation: guzPulse 2s infinite;
}

@keyframes guzPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.guz-ai-launcher .launcher-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.guz-ai-launcher .launcher-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.guz-ai-launcher .launcher-title .sparkle {
  color: #FFA84A;
}

.guz-ai-launcher .launcher-subtitle {
  font-size: 11px;
  color: rgba(238, 247, 252, 0.8);
  font-weight: 500;
}

/* ==========================================================================
   2. HEADER NAV BUTONU
   ========================================================================== */
.btn-guz-ai-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(7, 30, 50, 0.05) 0%, rgba(255, 107, 22, 0.1) 100%);
  border: 1px solid rgba(255, 107, 22, 0.35);
  border-radius: 999px;
  color: #071E32;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-guz-ai-nav:hover {
  background: #071E32;
  color: #FFFFFF;
  border-color: #071E32;
  transform: translateY(-1px);
}

.btn-guz-ai-nav .sparkle {
  color: #FF6B16;
}

.btn-guz-ai-nav .badge-live {
  background: #10B981;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   3. CHAT PENCERESİ (WIDGET MODAL)
   ========================================================================== */
.guz-ai-chat-window {
  position: fixed;
  left: 24px;
  bottom: 84px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(7, 30, 50, 0.25), 0 0 1px rgba(7, 30, 50, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 999;
  overflow: hidden;
  border: 1px solid rgba(7, 30, 50, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.guz-ai-chat-window.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.chat-window-header {
  background: linear-gradient(135deg, #071E32 0%, #0F3759 100%);
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #FF6B16;
}

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

.chat-header-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FF6B16 0%, #FFA84A 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(255, 107, 22, 0.4);
}

.chat-header-text h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-header-text p {
  font-size: 11.5px;
  color: rgba(238, 247, 252, 0.85);
  margin: 2px 0 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-header-text .status-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
}

.chat-header-actions button {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #FFFFFF;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-header-actions button:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Body / Mesaj Alanı */
.chat-window-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Mesaj Baloncukları */
.chat-message {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: msgFadeIn 0.25s ease-out;
}

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

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

.chat-message.is-ai {
  align-self: flex-start;
}

.chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.chat-message.is-ai .chat-msg-avatar {
  background: #071E32;
  color: #FF6B16;
}

.chat-message.is-user .chat-msg-avatar {
  background: #E2E8F0;
  color: #071E32;
}

.chat-msg-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-message.is-ai .chat-msg-bubble {
  background: #FFFFFF;
  color: #071E32;
  border-top-left-radius: 3px;
  border: 1px solid rgba(7, 30, 50, 0.08);
}

.chat-message.is-user .chat-msg-bubble {
  background: #071E32;
  color: #FFFFFF;
  border-top-right-radius: 3px;
}

.chat-msg-bubble p {
  margin: 0 0 6px 0;
}
.chat-msg-bubble p:last-child {
  margin-bottom: 0;
}
.chat-msg-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}
.chat-msg-bubble li {
  margin-bottom: 4px;
}
.chat-msg-bubble strong {
  font-weight: 700;
}
.chat-msg-bubble a {
  color: #FF6B16;
  text-decoration: underline;
  font-weight: 600;
}

/* Mesaj İçi Eylem Butonları */
.chat-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-action-btn {
  background: #EEF7FC;
  border: 1px solid rgba(7, 30, 50, 0.15);
  color: #071E32;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chat-action-btn:hover {
  background: #FF6B16;
  color: #FFFFFF;
  border-color: #FF6B16;
}

/* Yazıyor Animasyonu */
.chat-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid rgba(7, 30, 50, 0.08);
  width: fit-content;
}

.chat-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite both;
}

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

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; background: #FF6B16; }
}

/* Hızlı Öneri Çipleri (Prompt Chips) */
.chat-prompt-chips {
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.chat-prompt-chips::-webkit-scrollbar {
  display: none;
}

.chat-chip {
  background: #EEF7FC;
  border: 1px solid rgba(7, 30, 50, 0.1);
  color: #071E32;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.chat-chip:hover {
  background: #071E32;
  color: #FFFFFF;
  border-color: #071E32;
}

/* Footer / Input Alanı */
.chat-window-footer {
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 22px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  color: #071E32;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #FF6B16;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FF6B16;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.chat-send-btn:hover {
  background: #E05607;
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   4. MOBİL UYARLAMALAR
   ========================================================================== */
@media (max-width: 768px) {
  .guz-ai-launcher {
    left: 16px;
    bottom: 80px; /* Mobil alt barın üstünde */
    padding: 6px 12px 6px 8px;
  }
  .guz-ai-launcher .launcher-avatar {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .guz-ai-launcher .launcher-title {
    font-size: 12.5px;
  }
  .guz-ai-launcher .launcher-subtitle {
    display: none;
  }

  .guz-ai-chat-window {
    left: 10px;
    right: 10px;
    bottom: 74px;
    width: auto;
    max-width: none;
    height: calc(100vh - 90px);
  }
}
