@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --primary-color: #059669;
  --secondary-color: #0d9488;
  --accent-color: #3b82f6;
}

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-sarabun {
  font-family: 'Sarabun', 'TH Sarabun New', sans-serif !important;
}

.font-prompt {
  font-family: 'Prompt', sans-serif !important;
}

.font-kanit {
  font-family: 'Kanit', sans-serif !important;
}

/* Glassmorphism & Modern Shadows */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.card-hover {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

/* Pulse badge */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.pulse-indicator {
  animation: pulse-ring 2s infinite ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Leaflet Map Customization */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-family: 'Prompt', sans-serif;
  padding: 0;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.5;
}
.leaflet-container {
  font-family: 'Prompt', sans-serif;
}

/* Custom Marker Pins */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 2px solid white;
  font-size: 14px;
  transition: transform 0.2s;
}
.custom-pin:hover {
  transform: scale(1.2);
}

/* Print Stylesheet for Official Reports */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 14pt;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide screen elements */
  .no-print,
  nav,
  header,
  footer,
  #admin-bar,
  #modal-container,
  .btn,
  button,
  .tabs-nav,
  #toast-container {
    display: none !important;
  }

  /* Make report container full page */
  #main-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-only-wrapper {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-sheet {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10mm 15mm !important;
    page-break-after: auto;
  }

  /* Prevent page breaks inside important blocks */
  .print-sheet table,
  .print-sheet tr,
  .print-sheet .space-y-4 > div {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  @page {
    size: A4 portrait;
    margin: 15mm 15mm 15mm 15mm;
  }
}
