/**
 * AI Chat Widget Styles
 * Modüler yapı - config.js'deki renklerle özelleştirilebilir
 */

/* ====== AI CHAT FLOAT BUTTON (Animasyonlu Güneş) ====== */
.ai-chat-float {
  position: fixed;
  bottom: 95px;
  right: 12px;
  z-index: 9998;
  width: 90px;
  height: 90px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 4px 15px rgba(255, 184, 0, 0.5));
  padding: 0;
}

.ai-chat-float:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 6px 25px rgba(255, 184, 0, 0.8));
}

/* Güneş ışınları katmanı (DÖNER) */
.ai-sun-rays {
  position: absolute;
  inset: -12px;
  animation: ai-rays-spin 12s linear infinite;
}

.ai-sun-rays svg {
  width: 100%;
  height: 100%;
}

/* Güneş merkezi (SABİT - dönmez) */
.ai-sun-center {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 40%, #FFE44D 0%, #FFD700 30%, #FFA500 65%, #FF8C00 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 18px rgba(255, 184, 0, 0.5),
    inset 0 -3px 10px rgba(200, 120, 0, 0.3),
    inset 0 3px 10px rgba(255, 255, 255, 0.4);
}

/* ADEL AI text (SABİT) */
.ai-sun-text {
  position: relative;
  z-index: 3;
  font-size: 14px;
  font-weight: 900;
  color: #0a1628;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
  letter-spacing: 1.5px;
  user-select: none;
}

/* Pulse glow animation */
.ai-chat-float::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.35) 0%, transparent 70%);
  animation: ai-sun-pulse 2.5s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes ai-rays-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ai-sun-pulse {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.25); opacity: 0.5; }
}

/* ====== CHAT WINDOW ====== */
.ai-chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: #0d1b2a;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 184, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

/* ====== CHAT HEADER ====== */
.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a2d44, #0d1b2a);
  border-bottom: 1px solid rgba(255, 184, 0, 0.15);
  flex-shrink: 0;
}

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

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB800, #FF8C00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ai-chat-header-info h4 {
  margin: 0;
  font-size: 14px;
  color: #FFB800;
  font-weight: 700;
}

.ai-chat-header-info span {
  font-size: 11px;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-header-info span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.ai-chat-close {
  background: none;
  border: none;
  color: #8899aa;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
}

.ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ====== CHAT MESSAGES ====== */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar stili */
.ai-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 184, 0, 0.3);
  border-radius: 10px;
}

/* Message Bubble */
.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: ai-msg-in 0.3s ease;
}

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

.ai-msg.bot {
  align-self: flex-start;
  background: #1a2d44;
  color: #e0e7ee;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 184, 0, 0.08);
}

.ai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #FFB800, #e6a600);
  color: #0a1628;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

/* Bot message formatting */
.ai-msg.bot strong {
  color: #FFB800;
}

.ai-msg.bot a {
  color: #60b4ff;
  text-decoration: underline;
}

.ai-msg.bot ul, .ai-msg.bot ol {
  margin: 6px 0;
  padding-left: 18px;
}

.ai-msg.bot li {
  margin-bottom: 3px;
}

/* Typing indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
  background: #1a2d44;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.ai-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFB800;
  animation: ai-typing-bounce 1.2s ease-in-out infinite;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ====== QUICK REPLIES ====== */
.ai-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.ai-quick-btn {
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: #FFB800;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.ai-quick-btn:hover {
  background: rgba(255, 184, 0, 0.2);
  border-color: #FFB800;
}

/* ====== CHAT INPUT ====== */
.ai-chat-input-area {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 184, 0, 0.1);
  background: #0a1628;
  gap: 8px;
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  background: #1a2d44;
  border: 1px solid rgba(255, 184, 0, 0.15);
  border-radius: 24px;
  padding: 10px 16px;
  color: #e0e7ee;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  max-height: 80px;
  min-height: 40px;
  line-height: 1.4;
}

.ai-chat-input::placeholder {
  color: #5a6f83;
}

.ai-chat-input:focus {
  border-color: rgba(255, 184, 0, 0.4);
}

.ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB800, #FF8C00);
  border: none;
  color: #0a1628;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-chat-send:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 12px rgba(255, 184, 0, 0.4);
}

.ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ====== POWERED BY ====== */
.ai-chat-footer {
  text-align: center;
  padding: 4px 0 6px;
  font-size: 10px;
  color: #3a4f63;
  background: #0a1628;
  flex-shrink: 0;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .ai-chat-float {
    bottom: 155px;
    right: 8px;
    width: 72px;
    height: 72px;
  }

  .ai-sun-text {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .ai-chat-window {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .ai-chat-window.open {
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .ai-chat-float {
    bottom: 150px;
    right: 8px;
    width: 65px;
    height: 65px;
  }

  .ai-sun-text {
    font-size: 10px;
    letter-spacing: 0.8px;
  }
}

/* ====== DARK OVERLAY (mobile) ====== */
.ai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.ai-chat-overlay.active {
  opacity: 1;
  visibility: visible;
}
