/* Akıllı Kent Ağı (AKA) - Custom Styles, AI Scanning, Chatbot & Print Styles */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism effects */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .glass-panel {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Leaflet Map Customizations */
.leaflet-container {
  font-family: inherit;
  border-radius: 1rem;
  z-index: 10;
}

.custom-marker-pin {
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 0;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -19px 0 0 -19px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-marker-pin:hover {
  transform: rotate(-45deg) scale(1.15);
}

.custom-marker-pin span {
  transform: rotate(45deg);
  font-size: 14px;
}

/* Pulse animation for urgent issues */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.urgent-pulse {
  animation: pulse-ring 2s infinite;
}

/* ============================================================ */
/* 🤖 YAPAY ZEKA LAZER TARAMA & BOUNDING BOX ANİMASYONLARI      */
/* ============================================================ */
@keyframes laser-scan {
  0% {
    top: 0%;
    opacity: 0.8;
  }
  50% {
    top: 96%;
    opacity: 1;
  }
  100% {
    top: 0%;
    opacity: 0.8;
  }
}

.ai-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #2563eb, #38bdf8, transparent);
  box-shadow: 0 0 15px #38bdf8, 0 0 25px #2563eb;
  animation: laser-scan 2.2s infinite ease-in-out;
  pointer-events: none;
  z-index: 25;
}

.ai-scan-grid {
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

@keyframes target-pulse {
  0% { border-color: rgba(56, 189, 248, 0.8); box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); }
  50% { border-color: rgba(37, 99, 235, 1); box-shadow: 0 0 18px rgba(37, 99, 235, 0.7); }
  100% { border-color: rgba(56, 189, 248, 0.8); box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); }
}

.ai-bounding-box {
  animation: target-pulse 1.5s infinite;
}

/* ============================================================ */
/* 💬 WHATSAPP & CHATBOT STİLLERİ                              */
/* ============================================================ */
.chat-bubble-user {
  background: #dcf8c6;
  color: #111827;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.dark .chat-bubble-user {
  background: #005c4b;
  color: #e9edef;
}

.chat-bubble-bot {
  background: #ffffff;
  color: #111827;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.dark .chat-bubble-bot {
  background: #202c33;
  color: #e9edef;
}

/* Yazıyor Noktaları Animasyonu */
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #64748b;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Bildirim Dropdown Animasyonu */
@keyframes drop-in {
  0% { opacity: 0; transform: translateY(-10px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-drop-in {
  animation: drop-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================================ */
/* 📄 RESMİ BELEDİYE RAPORU & PRINT STİLLERİ                   */
/* ============================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt !important;
  }

  body * {
    visibility: hidden;
  }
  
  #official-report-modal, #official-report-modal * {
    visibility: visible;
  }
  
  #official-report-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #printable-report-content {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .no-print {
    display: none !important;
  }

  img {
    max-width: 100% !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  table {
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}
