/* Production styles for the North Ithilien tracker (replaces Tailwind Play CDN). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(1, 1, 1, 0.7)),
    url("background.jpg") center / cover fixed;
  background-color: #f8f5f0;
}

/* Reset default browser margins (Tailwind Preflight used to do this) */
p,
h1,
h2,
h3 {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

/* —— Layout & utilities used by the page —— */

.hidden {
  display: none !important;
}

.min-h-screen {
  min-height: 100vh;
}

.max-w-7xl {
  max-width: 80rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-\[900px\] {
  max-width: 900px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}

.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.25rem;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.75rem;
}

.overflow-x-auto {
  overflow-x: auto;
}

.text-center {
  text-align: center;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.font-light {
  font-weight: 300;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.text-\[\#1F2A2E\] {
  color: #1f2a2e;
}

.text-\[\#2E7D32\] {
  color: #2e7d32;
}

.text-white {
  color: #fff;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.bg-white {
  background-color: #fff;
}

.bg-white\/90 {
  background-color: rgba(255, 255, 255, 0.9);
}

.bg-\[\#F0F4F0\] {
  background-color: #f0f4f0;
}

.bg-\[\#2E7D32\] {
  background-color: #2e7d32;
}

.hover\:bg-\[\#F0F4F0\]:hover {
  background-color: #f0f4f0;
}

.hover\:bg-\[\#1E5F25\]:hover {
  background-color: #1e5f25;
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-3xl {
  border-radius: 1.5rem;
}

.border {
  border-width: 1px;
  border-style: solid;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.sticky {
  position: sticky;
}

.top-6 {
  top: 1.5rem;
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:border-\[\#2E7D32\]:focus {
  border-color: #2e7d32;
}

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .lg\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .lg\:col-span-9 {
    grid-column: span 9 / span 9;
  }
}

/* —— Page-specific —— */

/* Compact overview KPI tiles */
.stat-box {
  padding: 0.75rem 1rem;
}

.stat-box .stat-label {
  margin-bottom: 0.25rem;
}

.stat-box .stat-value {
  line-height: 1.15;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #f0f4f0;
  font-weight: 600;
}

.map-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}

#map-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

#heatmap-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #f0f4f0;
  color: #1f2a2e;
}

.legend-item:hover {
  background-color: #e0e7e0;
  transform: scale(1.02);
}

.legend-item .legend-count {
  color: #6b7280;
}

.legend-item.active {
  background-color: #2e7d32;
  color: white;
}

.legend-item.active .legend-count {
  color: rgba(255, 255, 255, 0.9);
}

#heatmap-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: #ddd;
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 4px;
  display: none;
  pointer-events: none;
  z-index: 10;
  line-height: 1.3;
  white-space: nowrap;
}
