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

:root {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Smooth scrolling & zero bottom gaps */
html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}

footer {
  margin-bottom: 0 !important;
}

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

/* Leaflet Map Custom Marker Styling */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.custom-pin:hover {
  transform: scale(1.15) translateY(-2px);
  z-index: 1000 !important;
}

.pin-pep {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 3px solid #ffffff;
  color: white;
}

.pin-prep {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 3px solid #ffffff;
  color: white;
}

.pin-ubs {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border: 3px solid #ffffff;
  color: white;
}

.user-location-pin {
  background: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Leaflet Popup Tweaks */
.leaflet-popup-content-wrapper {
  border-radius: 1rem;
  padding: 0.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.leaflet-popup-content {
  margin: 0.75rem 1rem;
  font-family: inherit;
  line-height: 1.4;
}

/* Correção crítica Leaflet vs Tailwind Preflight:
 * O reset do Tailwind (max-width: 100%) quebra as imagens de tiles do Leaflet.
 * Estas regras forçam a exibição correta e desobstruída das imagens das tiles.
 */
#map {
  width: 100% !important;
  min-height: 480px !important;
  height: 560px !important;
  position: relative !important;
  background-color: #f1f5f9 !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  z-index: 10 !important;
}

.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  background: #f1f5f9 !important;
  font-family: inherit !important;
}

.leaflet-container img,
.leaflet-container img.leaflet-tile,
.leaflet-tile-container img,
.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: 256px !important;
  height: 256px !important;
  display: block !important;
  visibility: visible !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Focus styles for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}
