html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Poppins', sans-serif;
}

/* Adicione este código ao seu arquivo style.css */

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d2419 0%, #3a2e22 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-content {
  text-align: center;
  max-width: 400px;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
  margin-bottom: 20px;
  position: relative;
}

.loading-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(233, 162, 59, 0.7));
  animation: pulse 2s infinite;
}

.loading-title {
  color: white;
  font-size: 28px;
  margin: 0 0 25px 0;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.loading-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-light));
  border-radius: 10px;
  animation: progress 3s ease forwards;
}

.loading-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin: 15px 0 0;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* sidebar fixo */
.sidebar-navigation {
  width: 80px;
  background-color: #313443;
  height: calc(100vh - 60px);
  /* altura total menos o header */
  position: relative;
  flex-shrink: 0;
}

/* header fixo no topo */
.headerUL {
  height: 60px;
  background-color: #313443;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

/* conteúdo principal com mapa */
.main-content {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* mapa ocupa o espaço todo */
#map {
  flex-grow: 1;
  width: 100%;
}

.ol-popup {
  position: absolute;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  background: white;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 200px;
  max-width: 300px;
  z-index: 1000;
  display: none;
}

#layer-toggle,
#filters {
  position: absolute;
  background: white;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#layer-toggle {
  top: 10%;
  right: 2%;
  background-color: rgba(59, 45, 30, 0.85);
  backdrop-filter: blur(12px);
  color: white;
  padding: 15px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  z-index: 10;
}

#layer-toggle select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

#layer-toggle select:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

#layer-toggle select option {
  background-color: var(--primary-dark);
  color: white;
}

/* Estilos para o painel de filtros */
#filters {
  position: absolute;
  top: 10%;
  /* Posição mais alta */
  left: 2%;
  max-height: 80vh;
  /* Aumentar altura máxima */
  width: 280px;
  /* Largura fixa para garantir mais espaço */
  overflow-y: auto;
  background-color: var(--panel-bg);
  backdrop-filter: blur(12px);
  color: white;
  padding: 15px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  z-index: 10;
}

#filters::-webkit-scrollbar {
  width: 6px;
}

#filters::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

#filters::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

/* Adicione estes estilos ao final do style.css */
.filter-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background-color: var(--primary-dark);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-header i {
  color: var(--accent-color);
  font-size: 18px;
  margin-right: 10px;
}

.filter-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.filter-section {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-section h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: var(--highlight);
  font-weight: 500;
}

.range-control {
  margin-bottom: 15px;
}

.range-control label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.range-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-slider input[type="range"] {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  appearance: none;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: var(--highlight);
}

.range-value {
  background-color: var(--primary-color);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 13px;
  min-width: 25px;
  text-align: center;
}

.filter-item {
  position: relative;
  margin-bottom: 18px;
}

.filter-item label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.search-input {
  position: relative;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.search-input i.fa-search {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.search-input input {
  width: 100%;
  padding: 12px 12px 12px 35px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
}

.clear-input {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 14px;
  display: none;
  padding: 0;
  opacity: 0.8;
  transition: var(--transition);
}

.clear-input:hover {
  color: var(--text-white);
  opacity: 1;
}

.clear-input.visible {
  display: block;
}

.search-input input:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.search-input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.dropdown-list {
  max-height: 150px;
  overflow-y: auto;
  background-color: rgba(70, 55, 40, 0.95);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
  padding: 0;
  list-style: none;
  display: none;
  position: absolute;
  width: calc(100% - 30px);
  z-index: 1010;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-list.dropup {
  bottom: 100%;
  /* Posiciona acima do elemento pai */
  top: auto;
  /* Cancela o posicionamento padrão */
  margin-bottom: 5px;
  /* Espaço entre o input e o dropdown */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  /* Sombra ajustada para direção de cima */
}

#dropdownListGenus,
#dropdownListSpecies {
  max-height: 180px;
  /* Um pouco maior para mostrar mais opções */
}

.dropdown-list li {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.dropdown-list li:hover {
  background-color: var(--primary-color);
}

.dropdown-list li:last-child {
  border-bottom: none;
}

.dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.dropdown-list::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

#popup {
  max-width: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  padding: 0; /* padding deve ser no content */
}

#popup-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 15px;
  scroll-behavior: smooth;
}

.fossil-popup-item {
  margin-top: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.fossil-popup-item:last-child {
  border-bottom: none;
}

.fossil-popup-item h4 {
  margin: 0 0 8px 0;
  color: #5d4a38;
}

.fossil-details p {
  margin: 5px 0;
  font-size: 13px;
}

.id-field {
  color: #777;
  font-size: 12px;
}

/* Estilos para o botão de zoom */
.ol-zoom {
  top: 180px;
  left: auto;
  /* Remover posicionamento à esquerda */
  right: 20px;
  /* Posicionar à direita */
  background-color: rgba(67, 56, 49, 0.75);
  padding: 2px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.ol-zoom .ol-zoom-in,
.ol-zoom .ol-zoom-out {
  background-color: transparent;
  color: white;
  margin: 1px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.ol-zoom .ol-zoom-in:hover,
.ol-zoom .ol-zoom-out:hover {
  background-color: var(--accent-color);
  transform: scale(1.1);
}

/* Ajustes para o botão de voltar */
.back-button {
  bottom: auto;
  top: 20px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Ajuste para o toolbox */
#toolbox {
  top: 80px;
  right: 62px;
}

/* Estilos para o botão de alternar mapa */
.map-toggle-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10
;
  text-align: center;
}

.map-toggle-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-toggle-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.map-toggle-btn i {
  font-size: 18px;
}

/* Estilos para o mapa de routing */
.routingMapaDiv {
  width: 100%;
  height: 100%;
}

.routingMapaDiv .main-content {
  position: relative;
}

#routing_iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Estilo para botões de navegação */
.fixed-map-navigation {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  padding: 10px;
  border-radius: 30px;
  background-color: #3a2e22;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.map-nav-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.map-nav-btn:hover {
  color: white;
  background-color: #3a2e22;
}

.map-nav-btn.active {
  background-color: var(--accent-color);
  color: white;
  box-shadow: 0 2px 8px rgba(233, 162, 59, 0.4);
}

.map-nav-btn i {
  font-size: 16px;
}

/* Animação de transição para os mapas */
#mapaOpenlayers, #mapaRouting {
  transition: opacity 0.5s ease;
}
