:root {
  --bg-1: #fdf6e3;
  --accent: #f5f5f5;
  --panel-bg: rgba(255, 255, 255, 0.85);
  --text-color: #111;
  --btn-hover: #e0e0e0;
}
 
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background: radial-gradient(circle at 20% 10%, rgba(245,214,186,0.1), transparent 10%),
              linear-gradient(180deg, var(--bg-1), #f0e8d0 60%);
}

#map {
  height: 100vh;
  width: 100%;
  position: relative;
  z-index: 0;
}

.info.leaflet-control,
.info.leaflet-control * ,
h2.__web-inspector-hide-shortcut__ {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#map-header {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 18px 28px;
  font-family: 'Open Sans', sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #000000;
  border-radius: 5px;
  z-index: 1000;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: 100px;
  left: 10px;
  z-index: 1000;
}

.button-group button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  height: 50px;
  width: 150px;
  border: none;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.button-group button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

#stats-btn {
  background: #000;
  color: #fff;
}

#stats-btn:hover {
  background: #222;
}

#chart-btn {
  background: #fff;
  color: #000;
}

#chart-btn:hover {
  background: #f0f0f0;
}

#details-btn{
background: #fff;
  color: #000;
}

#details-btn:hover {
  background: #f0f0f0;
}

#stats-panel {
  position: absolute;
  top: 90px;
  left: 10px;
  width: 500px;
  max-width: 520px;
  max-height: 75vh;
  padding: 24px;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  background: white;
  color: black;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
  z-index: 3000;
}

#close-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

#close-panel img {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
  pointer-events: none;
}

#close-panel:hover img {
  transform: scale(1.2);
}


#stats-panel > * {
  box-sizing: border-box;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#stats-panel h2 {font-size: 30px;
  font-weight: 600;
  color: #222;
  margin: 0 0 16px 0;
  padding-bottom: 6px;    
  border-bottom: 2px solid #e5e5e5;
  letter-spacing: 0.5px;
}

#stats-panel h4 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

#stats-panel p,
#stats-panel li {
  font-size: 20px;
  line-height: 1.6;
}

#stats-panel button {
  background: var(--accent);
  border: 1px solid #ccc;
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

#stats-panel button:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
}


#stats-panel::-webkit-scrollbar {
  width: 8px;
}

#stats-panel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

#stats-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
}

#stats-panel canvas {
  background: transparent;
  border-radius: 6px;
}

@media (max-width:900px){
  #stats-btn{
    left:12px;
    top:6vh;
    padding:10px 12px;
  }
  #stats-panel{
    left:8px;
    width: calc(100% - 16px);
    top: 60px;
    max-height: 60vh;
    border-radius:8px;
  }
}

.hidden {
  display: none !important;
}

#group-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 14px 42px 14px 18px; 
  font-size: 22px;
  font-family: 'Open Sans', sans-serif;
  color: #0f0f0f;

  background-color: #fff;
  border: 2px solid transparent;
  border-left: 6px solid #ffffff;
  border-radius: 8px;

  cursor: pointer;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  position: relative;
}

#group-select-container {
  position: relative;
  width: 100%;
}

#group-select-container::after {
  content: '▼';
  font-size: 18px;
  position: absolute;
  right: 12px;
  top: 50%; 
  transform: translateY(-50%); 
  color: #000000; 
  pointer-events: none; 
}

#group-select:hover, 
#group-select:focus { border-color: #030303; 
   outline: none;
}

#logo-link {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 2000; 
  display: inline-block;
  pointer-events: auto;
}
#logo-link img#map-logo {
  width: 130px;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0.95;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.12));
}

.leaflet-control-layers {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  padding: 10px;
  font-family: 'Open Sans', sans-serif;;
}

.leaflet-control-layers-list {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
  resize: both;
  overflow: auto;
  min-width: 200px;
  min-height: 150px;
  max-width: 90vw;
  max-height: 90vh;
  border: 2px solid #1d2125;
}

.leaflet-layerstree-header-pointer {
  background-color: #1d2125;
  color: #fff;
  padding: 5px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 5px;
}

.leaflet-layerstree-header-label {
  display: flex;
  align-items: center;
  padding: 3px;
  margin: 2px 0;
  border-radius: 4px;
}

.leaflet-layerstree-header-label:hover {
  background-color: rgba(14, 54, 139, 0.1);
}

.leaflet-layerstree-header-name img {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  object-fit: contain;
}

.leaflet-control-layers-toggle {
  width: 34px;
  height: 34px;
  background: transparent url("../images/layers1.svg") no-repeat center !important;
  background-size: 28px 28px !important;
  border: none !important;
  display: inline-block;
  box-sizing: border-box;
}

.leaflet-control-measure-toggle {
  display: none !important;
}

@media (max-width:700px){
  #logo-link{ left: 8px; bottom: 8px; }
  #logo-link img#map-logo{ width: 80px; }
}

#github-link{
  position:fixed;
  left:10%;
  bottom:16px;
  transform:translateX(-50%);
  z-index:10000;
  display:inline-block;
  text-decoration:none;
}

#github-logo{
  width:50px;
  height:50px;
  display:block;
  object-fit:contain;
  background: rgba(255, 255, 255, 0.9);
  padding:6px;
  border-radius:8px;
  border:1px solid #333;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

#github-link:focus #github-logo,
#github-link:hover #github-logo{
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
  border-color: rgba(3,102,214,0.18);
}

@media (max-width:480px){
  #github-logo{ width:38px; height:38px; padding:5px; bottom:12px; }
}

#compass-container {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 10000;
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  border: 1px solid #333;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

#compass-container:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
  border-color: rgba(3,102,214,0.18);
}

@media (max-width:700px){
  #compass-container {
    width: 36px;
    height: 36px;
    bottom: 8px;
  }
}
#compass {
  max-width: 80%;
  max-height: 80%;
  height: auto;
  width: auto;
  display: block;
}

.scale-control {
  position: fixed;
  bottom: 16px;
  left: calc(50% - 190px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 11px 15px;
  font-family: 'Open Sans', sans-serif;;
  font-size: 16px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.scale-bar {
  height: 10px;
  min-width: 100px;
  margin-bottom: 2px;
  border: 1px solid #333;
  display: flex;
  background: linear-gradient(90deg, 
    #000000 0%, #000000 25%,
    #ffffff 25%, #ffffff 50%,
    #000000 50%, #000000 75%,
    #ffffff 75%, #ffffff 100%
  );
}

.scale-text {
  text-align: center;
  color: #333;
  margin: 0;
}


@media (max-width: 768px) {
  .scale-control {
    bottom: 12px;
    left: calc(50% - 120px);
    font-size: 16px;
    padding: 4px 8px;
  }
  
  .scale-bar {
    min-width: 80px;
    height: 6px;
  }
}



#coords {
  position: fixed;
  bottom: 16px;       
  left: calc(50% + 60px); 
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  border: 1px solid #333;
  border-radius: 6px;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 1000;
}

#painelchart {
  position: absolute;
  top: 90px;
  left: 10px;
  width: 500px;
  max-width: 520px;
  max-height: 80vh;
  padding: 24px;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  background: white;
  color: black;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  z-index: 9999;
}
.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#close-painelchart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#close-painelchart img {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

#close-painelchart:hover img {
  transform: scale(1.2);
}

#painelchart::-webkit-scrollbar { width: 8px; }
#painelchart::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
#painelchart::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); }

@media (max-width:900px){
  #painelchart {
    left:8px;
    width: calc(100% - 16px);
    top: 60px;
    max-height: 60vh;
    border-radius:8px;
  }
}

#painelchart h2{
  font-size: 30px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 16px 0;
  padding-bottom: 6px;    
  border-bottom: 2px solid #e5e5e5;
  letter-spacing: 0.5px;
}

#myChart {
  margin-top: 20px;
}

#chartSelectPanel {
  max-width: 220px;
  background-color: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: #0f0f0f;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

#chartSelectPanel:hover,
#chartSelectPanel:focus-within {
  border-color: #030303;
}

#chartSelectPanel select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  color: #0f0f0f;

  background-color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

#chartSelectPanel::after {
  content: '▼';
  font-size: 18px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #000000;
  pointer-events: none;
}

#popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex; 
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  background: #fff;
  color: #000;
  padding: 24px;
  width: 500px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px;
  font-family: 'Open Sans', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
#close-popup {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;    
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#close-popup img {
  width: 20px;     
  height: 20px;
  max-width: 100%;
  display: block;
  line-height: 0;
  pointer-events: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

#close-popup:hover img {
    transform: scale(1.2); 
}

.fakePainel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  height: 35px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  background: #000;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.fakePainel-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.fakeGrafícos-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  height: 35px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.fakeGrafícos-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
