/* 
Este código foi desenvolvido por Gustavo Cerqueira Murai.
GitHub: https://github.com/gustavomurai
Behance: https://www.behance.net/Muraiart
*/

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom right, #3493be, #1688e6);
  color: white;
  text-align: center;
  padding: 50px;
  min-height: 100vh;
  margin: 0;
  transition: background 3s ease-in-out, color 0.3s ease;
}

.container {
  max-width: 550px;
  width: 90%;
  margin: auto;
  background-color: rgba(11, 73, 97, 0.15);
  padding: 20px;
  border-radius: 15px;
  border: 2px solid rgb(171, 224, 255);
  box-shadow: 0 4px 10px rgba(0, 39, 71, 0.2);
  transition: all 0.3s ease;
}

input {
  padding: 10px;
  width: 70%;
  
  border-radius: 3px;
  border: none;
  outline: none;
  box-shadow: 0 2px 5px rgba(110, 0, 0, 0.2);
  transition: all 0.3s ease;
}

input::placeholder {
  color: #333;
}

button {
  padding: 10px 15px;
  height: 44px;
  background-color: white;
  color: #3a5d85;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.3s, color 0.3s ease;
  box-sizing: border-box;
}

button:hover {
  background-color: #e0f7fa;
}

#resultado img {
  width: 80px;
  height: 80px;
}

#previsao {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  gap: 1px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 10px;
}

#previsao > div {
  text-align: center;
  background-color: rgba(40, 102, 173, 0.342);
  padding: 10px;
  border-radius: 8px;
  border: 2px solid rgb(85, 175, 226); /* Cor da borda no modo claro */
  min-width: 100px;
  flex: 0 0 auto;
  transition: all 0.3s ease;
}

#mapa {
  display: none;
  margin-top: 30px;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid white; /* Borda no modo claro */
  transition: border 0.3s ease;
}

body.modo-escuro #mapa {
  border: 2px solid hsl(209, 49%, 34%); /* Borda no modo escuro */
}


#toggleModo {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #195688;
  color: #ffffff;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  z-index: 9999;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#toggleModo:hover {
  background-color: #2370b0;
}

body.modo-escuro {
  background: linear-gradient(to bottom right, #0b1a2a, #112f4d);
  color: #fcf8f8;
}

body.modo-escuro .container {
  background-color: rgba(7, 9, 43, 0.4);
  border-color: #14436e;
}

body.modo-escuro #toggleModo {
  background-color: #22497c;
  color: #c7f4ff;
}

body.modo-escuro input {
  background-color: #214a79;
  color: #ffffff;
  border: none;
}

body.modo-escuro input::placeholder {
  color: #bbb;
}

body.modo-escuro #previsao > div {
  background-color: rgba(3, 3, 3, 0.5);
  border: 2px solid #1b5483; /* Cor da borda no modo escuro */
}

#localizacaoBtn {
  height: 50px; /* igual ao input */
  padding: 12px 18px;
  font-size: 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.3s, color 0.3s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}


#localizacaoBtn:hover {
  background-color: #111;
}

#localizacaoBtn svg {
  fill: red;
}

body.modo-escuro #localizacaoBtn {
  background-color: #3f1919;
}

.busca-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch; /* ✅ Adicione essa linha */
  flex-wrap: wrap;
  margin-bottom: 20px;
  position: relative;
}


.busca-container input {
  flex: 1;
  min-width: 300px; /* 🔼 aumentei de 200px pra 300px */
  padding: 12px 18px; /* 🔼 mais espaçamento interno */
  height: 50px; /* 🔼 altura um pouco maior */
  font-size: 18px; /* 🔼 texto maior */
  border-radius: 8px;
  border: none;
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(110, 0, 0, 0.2);
  transition: all 0.3s ease;
}


#localizacaoBtn {
  background-color: #13537e;
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

#localizacaoBtn:hover {
  background-color: #333;
}

body.modo-escuro #localizacaoBtn {
  background-color: hsl(212, 61%, 32%);
}

body.modo-escuro #localizacaoBtn:hover {
  background-color: #3e78a8;
}

.busca-container button,
.busca-container #localizacaoBtn {
  flex: 1;
  height: 50px;
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.3s, color 0.3s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Lista de sugestões */


.campo-com-sugestoes {
  flex: 2;
  position: relative;
}

#sugestoes {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  background-color: rgb(255, 255, 255);
  color: rgb(235, 60, 60);
  width: 100%; /* ✅ Agora 100% da .campo-com-sugestoes (que tem 70% do container) */
  left: 0;
  z-index: 1000;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
  box-sizing: border-box;
  text-align: left;
}

#sugestoes:has(li) {
  display: block;
}

#sugestoes li {
  padding: 10px;
  border-bottom: 1px solid #0f4c5c54;
  cursor: pointer;
  transition: background-color 0.2s;
  color: rgb(52, 95, 145);
  background-color: white;
}

#sugestoes li:last-child {
  border-bottom: none;
}

#sugestoes li:hover,
#sugestoes li:focus {
  background-color: #f0f0f0;
}

body.modo-escuro #sugestoes {
  background-color: #0c294e;
  color: white;
  border-color: #1b5483;
}

body.modo-escuro #sugestoes li {
  background-color: #103157;
  color: rgb(230, 245, 255);
}

body.modo-escuro #sugestoes li:hover {
  background-color: #222;
}

body.modo-escuro .busca-container button {
  background-color: #214a79;
  color: #b8ebff;
}

body.modo-escuro .busca-container button:hover {
  background-color: #172f49;
  color: #daf3ff;
}