/* Sidre AI Assistant - Site Uyumlu Profesyonel Tasarım */
/* Ana Renkler: #2f50e2 (mavi), #202020 (koyu gri), #ffffff (beyaz) */

.yildiz-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Chat Toggle Button - Site ile Uyumlu */
.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #2f50e2;
  border: none;
  box-shadow: 0 4px 20px rgba(47, 80, 226, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(47, 80, 226, 0.45);
  background-color: #1a3bc4;
}

.chat-toggle-btn:active {
  transform: translateY(-1px);
}

.chat-toggle-btn svg {
  width: 26px;
  height: 26px;
  fill: white;
}

/* Chat Container - Temiz ve Profesyonel */
.chat-container {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  border: 1px solid #eaeeed;
}

.chat-container.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

/* Chat Header - Site Footer Renkleriyle Uyumlu */
.chat-header {
  background-color: #202020;
  color: white;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #2f50e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-header-avatar svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.chat-header-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.chat-header-text p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #b9c0cd;
}

.chat-header-text .status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-header-text .status-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
}

.chat-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-close-btn svg {
  width: 16px;
  height: 16px;
  fill: white;
  display: block;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9f9fb;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
}

.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #cfd7d9;
  border-radius: 3px;
}

/* Message Bubbles */
.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: #2f50e2;
  color: white;
}

.message.bot .message-avatar {
  background: #202020;
  color: white;
}

.message.bot .message-avatar svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.user .message-content {
  background: #2f50e2;
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot .message-content {
  background: #ffffff;
  color: #363636;
  border: 1px solid #eaeeed;
  border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eaeeed;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f50e2;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Chat Input */
.chat-input-container {
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #eaeeed;
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #f9f9fb;
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #eaeeed;
  transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
  border-color: #2f50e2;
  box-shadow: 0 0 0 3px rgba(47, 80, 226, 0.1);
}

.chat-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  padding: 10px 8px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  max-height: 80px;
  line-height: 1.4;
  color: #363636;
}

.chat-input::placeholder {
  color: #9ba3ae;
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2f50e2;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
  background: #1a3bc4;
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Chat Footer */
.chat-footer {
  text-align: center;
  padding: 10px 16px;
  font-size: 11px;
  color: #9ba3ae;
  background: #f9f9fb;
  border-top: 1px solid #eaeeed;
}

.chat-footer a {
  color: #2f50e2;
  text-decoration: none;
  font-weight: 600;
}

.chat-footer a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .yildiz-chatbot {
    bottom: 16px;
    right: 16px;
  }

  .chat-container {
    width: calc(100vw - 32px);
    max-width: none;
    bottom: 72px;
    border-radius: 10px;
  }

  .chat-toggle-btn {
    width: 54px;
    height: 54px;
  }

  .chat-header {
    padding: 14px 16px;
  }

  .chat-messages {
    padding: 16px;
    min-height: 220px;
  }

  .chat-input-container {
    padding: 12px 16px;
  }

  .message-content {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 13px;
  }
}