/* ระบบบริหารจัดการข้อมูลขยะ เทศบาลตำบลนิคมสงเคราะห์ 
   Style definitions & Theme tokens
*/

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

:root {
  --font-base: 'Prompt', sans-serif;
  --font-heading: 'Prompt', sans-serif;
  
  /* Pastel Green Theme Tokens */
  --color-primary-50: #f0fdf4;
  --color-primary-100: #dcfce7;
  --color-primary-200: #bbf7d0;
  --color-primary-300: #86efac;
  --color-primary-400: #4ade80;
  --color-primary-500: #22c55e;
  --color-primary-600: #16a34a;
  --color-primary-700: #15803d;
  --color-primary-800: #166534;
  --color-primary-900: #14532d;
  
  --bg-watermark: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2316a34a' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M25 20h10v5H25zm12 5h-14v-2a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v2zm-12 3h10l-1 14h-8l-1-14zm25 45h20v10h-20zm0 0v-6h14l4 6h2zm18 10a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm-14 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM85 20l5 9h-6l-2-4-2 4h-6l5-9zm8 15l-5 9 3 5 5-9zm-16 0l5 9-3 5-5-9z'/%3E%3C/g%3E%3C/svg%3E");
}

* {
  font-family: 'Prompt', sans-serif;
}

body {
  font-family: 'Prompt', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading, input, select, button, textarea {
  font-family: 'Prompt', sans-serif;
}

/* Watermark background on Header and sections */
.bg-waste-pattern {
  background-image: var(--bg-watermark);
  background-repeat: repeat;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 163, 74, 0.7);
}

/* Animations */
@keyframes pulseSubtle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.animate-pulse-subtle {
  animation: pulseSubtle 3s infinite ease-in-out;
}

/* Active tab styling indicator */
.tab-active {
  border-bottom: 3px solid #16a34a !important;
  color: #15803d !important;
  font-weight: 600 !important;
  background-color: rgba(220, 252, 231, 0.5) !important;
}

.dark .tab-active {
  border-bottom: 3px solid #4ade80 !important;
  color: #86efac !important;
  background-color: rgba(20, 83, 45, 0.35) !important;
}

/* Badge styles */
.badge-waste-organic {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.badge-waste-general {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.badge-waste-recycle {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-waste-hazard {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Map Container */
#gpsMap {
  width: 100%;
  height: 520px;
  border-radius: 0.75rem;
  z-index: 10;
}

/* Custom Marker styles */
.truck-marker-icon {
  background: white;
  border: 2px solid #16a34a;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-size: 16px;
  transition: all 0.3s ease;
}

.truck-marker-icon.active {
  background: #22c55e;
  color: white;
  animation: pulseSubtle 2s infinite;
}

/* Print Stylesheet for Ctrl+P & Print Button */
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
  
  body {
    background-color: white !important;
    color: black !important;
    font-size: 11pt !important;
  }

  /* Hide navigation, tabs, action buttons, filters that are interactive */
  header, 
  nav, 
  .no-print, 
  #loginModal, 
  #opModal, 
  #truckModal, 
  #staffModal,
  .btn-action,
  .print-hide {
    display: none !important;
  }

  /* Show Print Only Header */
  .print-only-header {
    display: block !important;
    margin-bottom: 20px;
    border-bottom: 2px solid #16a34a;
    padding-bottom: 10px;
  }

  /* Make containers full width */
  main, .container, .tab-pane {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ensure charts and cards break nicely */
  .card, .stat-card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

.print-only-header {
  display: none;
}
