/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  --black-color: hsl(220, 24%, 12%);
  --black-color-light: hsl(220, 24%, 15%);
  --black-color-lighten: hsl(220, 20%, 18%);
  --white-color: #fff;
  --body-color: hsl(220, 100%, 97%);

  /*========== Font and typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --normal-font-size: .938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Estilo para o conteúdo */
body {
  padding-top: 2rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  display: flex;
  justify-content: center; /* Alinha horizontalmente */
  align-items: center;     /* Alinha verticalmente */
  flex-direction: column;  /* Permite que os elementos se empilhem verticalmente */
  min-height: 100vh !important;
  background-color: var(--body-color);
  margin: 0;
  overflow: auto; /* Permite rolagem caso os elementos ocupem mais espaço que a tela */
}


/* Container principal */
.main-container {
  width: 100%;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

/* Campo de pesquisa */
.search-bar {
  display: flex;
  gap: 10px;
  justify-content: center; /* Centraliza os itens horizontalmente */
  align-items: center;
}

.search-bar input,
.search-bar select {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-bar button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: var(--black-color);
  color: var(--white-color);
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.search-bar button:hover {
  background-color: var(--black-color-light);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.map-container {
  background-color: var(--white-color);
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  height: auto; /* Pode ser ajustado manualmente */
  max-height: none; /* Permite que ultrapasse a tela */
}

#map {
  width: 100%;
  height: 500px; /* Valor inicial ajustável */
}


/* Ocorrências */
.occurrences-container {
  background-color: var(--white-color);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  overflow-y: auto; /* Adiciona rolagem apenas se necessário */
  height: auto; /* Pode ser ajustado manualmente */
  max-height: none; /* Permite ultrapassar o limite da tela */
}

.occurrences-container h3 {
  margin-bottom: 10px;
}

#occurrences {
  font-size: 0.9rem;
  color: var(--black-color);
}


@media (max-width: 768px) {
  .content {
    flex-direction: column; 
  }

  .map-container, .occurrences-container {
    flex: 1 1 100%; 
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-bar input,
  .search-bar button {
    width: 100%; 
  }
}

/* Wrapper para os cards */ 
.card-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* Centraliza o conjunto de cards */
  align-items: flex-start; /* Garante o alinhamento vertical correto */
  margin: 0 auto;
  padding: 10px;
}

/* Estilos dos cards */
.card {
  width: calc(25% - 20px); /* 3 cards por linha */
  max-width: 300px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Garante que os elementos internos fiquem bem distribuídos */
}

/* Status fixo no canto superior direito */
.card .status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
  z-index: 2; /* Garante que o status esteja acima da imagem */
}

.card .status.finalizado {
  background-color: #28a745; /* Verde para finalizado */
}

.card .status.andamento {
  background-color: #dc3545; /* Vermelho para andamento */
}

/* Estilos da imagem do card */
.card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* Define proporção da imagem */
  object-fit: cover; /* Cobre todo o espaço do elemento mantendo o aspecto */
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-bottom: 10px;
  z-index: 1; /* Evita sobreposição */
}

/* Estilos do título */
.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

/* Estilos dos parágrafos */
.card p {
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Botões de paginação */
.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-pagination {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-pagination:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.btn-pagination:disabled {
  cursor: not-allowed;
  background-color: #e0e0e0;
}

/* Responsividade */
@media (max-width: 1024px) {
  .card {
    flex: 1 1 calc(50% - 20px); /* 2 cards por linha */
  }
}

@media (max-width: 768px) {
  .card {
    flex: 1 1 100%; /* 1 card por linha */
  }
}


.form-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.form-container h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-container input, 
.form-container select, 
.form-container textarea, 
.button-submit {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-container textarea {
  resize: none;
}

.form-container select {
  background-color: #fff;
  color: #333;
}

.button-submit {
  background: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.button-submit:hover {
  background: #45a049;
}

.form-container input[type="file"] {
  padding: 5px;
}

@media (max-width: 768px) {
  .form-row {
      flex-direction: column;
  }
}

/* Estilo para o fundo escuro */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Ocultar modal por padrão */
.hidden {
  display: none;
}

/* Caixa do modal */
.modal {
  position: relative;
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

/* Cabeçalho do modal */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h4 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

/* Corpo do modal */
.modal-body {
  margin-bottom: 20px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.modal-body input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Rodapé do modal */
.modal-footer {
  text-align: right;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.modal-close:hover {
  color: #ff0000;
}

.btn-save {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-save:hover {
  background-color: #0056b3;
}

#street {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  color: black; /* Garante que o texto digitado seja preto */
}

/* Sobrescrevendo o estilo das sugestões */
.pac-container {
  background-color: white !important; /* Fundo branco para as sugestões */
}

.pac-item {
  color: black !important; /* Garante que o texto das sugestões seja preto */
  font-size: 1rem; /* Ajusta o tamanho da fonte, se necessário */
}

.pac-item:hover {
  background-color: #f0f0f0; /* Cor de fundo ao passar o mouse */
}

.pac-matched {
  color: black !important; /* Garante que o texto destacado nas sugestões seja preto */
}

/* Caso existam outros estilos inseridos dinamicamente */
.pac-item span {
  color: black !important; /* Garante que spans internos tenham texto preto */
}

.pac-item .pac-icon {
  color: black !important; /* Garante que ícones não fiquem invisíveis */
}

.pac-item-query {
  color: black !important; /* Ajusta cor para o texto digitado pelo usuário */
}

.modal-body label {
  display: block;
  margin: 10px 0 5px;
}

.modal-body select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
}


.chart-container {
  width: 45%; /* Ajustado para ocupar 45% da largura cada um */
  height: 400px;
  margin: 1%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.info-map-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  background-color: var(--white-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.info-section, .map-section {
  flex: 1;
  background-color: var(--body-color);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.info-section table {
  width: 100%;
  border-collapse: collapse;
}
.info-section table tr {
  border-bottom: 1px solid #ccc;
}
.info-section table td {
  padding: 10px;
  border-bottom: 1px solid #ccc;
}
.info-section table td:first-child {
  border-right: 1px solid #ccc;
  font-weight: bold;
}
.map-section #map {
  height: 100%;
  width: 100%;
  border-radius: 8px;
}
.photos-container {
  margin-top: 20px;
  background-color: var(--white-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card-wrapper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.card {
  border: 1px solid #ccc;
  padding: 10px;
  flex: 1 1 calc(33.333% - 20px);
  box-sizing: border-box;
  border-radius: 8px;
  background-color: var(--body-color);
}

.modal-images {
  display: none; /* Oculta o modal por padrão */
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Fundo escuro */
}

/* Conteúdo do modal (imagem expandida) */
.modal-content-images {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

/* Botão de fechar */
.close-modal-images {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close-modal-images:hover,
.close-modal-images:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.status-finalizado {
  background-color: green;
  color: white;
  padding: 5px; 
  border-radius: 6px; 
}

.status-pendente {
  background-color: red;
  color: white;
  padding: 5px;
  border-radius: 6px;
}
