/* ===================================================================
   SİSMİK UYARI - AI CHATBOT WİDGET
   =================================================================== */

/* Chatbot Butonu */
#sismik-chatbot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f6a9a 0%, #12335f 100%);
  border: 2px solid rgba(65,177,255,0.4);
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 20px rgba(65,177,255,0.15);
  transition: all 0.3s ease;
}
#sismik-chatbot-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 36px rgba(0,0,0,0.45), 0 0 30px rgba(65,177,255,0.25);
  border-color: rgba(65,177,255,0.7);
}
#sismik-chatbot-btn svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  transition: transform 0.3s ease;
}
#sismik-chatbot-btn.open svg {
  transform: rotate(90deg);
}

/* Bildirim noktasi */
#sismik-chatbot-btn .chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #ff4757;
  border-radius: 50%;
  border: 2px solid #0a1220;
  animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Chat Penceresi */
#sismik-chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-height: 540px;
  border-radius: 20px;
  overflow: hidden;
  z-index: 99998;
  display: none;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14,21,37,0.97), rgba(10,18,32,0.98));
  border: 1.5px solid rgba(65,177,255,0.2);
  box-shadow: 0 12px 50px rgba(0,0,0,0.5), 0 0 30px rgba(65,177,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: chatSlideUp 0.3s ease;
}
#sismik-chatbot-window.visible {
  display: flex;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
#sismik-chatbot-window .chat-header {
  background: linear-gradient(135deg, #12335f 0%, #0f6a9a 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(65,177,255,0.15);
  flex-shrink: 0;
}
.chat-header .chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #41b1ff, #00e3b2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.chat-header .chat-info {
  flex: 1;
}
.chat-header .chat-info h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.chat-header .chat-info span {
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
}
.chat-header .chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
}
.chat-header .chat-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Mesaj Alani */
#sismik-chatbot-window .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  max-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: rgba(65,177,255,0.2) transparent;
}
.chat-messages::-webkit-scrollbar {
  width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(65,177,255,0.2);
  border-radius: 10px;
}

/* Mesaj Baloncuklari */
.chat-msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
  animation: msgFade 0.25s ease;
}
@keyframes msgFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(65,177,255,0.12), rgba(0,227,178,0.08));
  border: 1px solid rgba(65,177,255,0.15);
  color: #d0e8f7;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1a4a7a, #12335f);
  border: 1px solid rgba(65,177,255,0.25);
  color: #e8f0fa;
  border-bottom-right-radius: 4px;
}

/* Hizli Sorular */
.chat-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.chat-quick-btn {
  background: rgba(65,177,255,0.1);
  border: 1px solid rgba(65,177,255,0.2);
  color: #7ec8f0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chat-quick-btn:hover {
  background: rgba(65,177,255,0.2);
  border-color: rgba(65,177,255,0.4);
  color: #fff;
}

/* Typing Indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 11px 15px;
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(65,177,255,0.12), rgba(0,227,178,0.08));
  border: 1px solid rgba(65,177,255,0.15);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}
.chat-typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #41b1ff;
  animation: typingBounce 1.4s infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Input Alani */
#sismik-chatbot-window .chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(65,177,255,0.1);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(10,18,32,0.6);
  flex-shrink: 0;
}
.chat-input-area input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(65,177,255,0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: #e0ecf5;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.chat-input-area input::placeholder {
  color: rgba(255,255,255,0.3);
}
.chat-input-area input:focus {
  border-color: rgba(65,177,255,0.4);
}
.chat-input-area button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #41b1ff, #0f6a9a);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chat-input-area button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(65,177,255,0.3);
}
.chat-input-area button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.chat-input-area button svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Mobil */
@media (max-width: 480px) {
  #sismik-chatbot-window {
    right: 8px;
    left: 8px;
    bottom: 90px;
    width: auto;
    max-height: 70vh;
    border-radius: 16px;
  }
  #sismik-chatbot-btn {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
}
