/* Cores usadas: tons de azul e branco/cinza para contraste */
/* Usando margin e padding zero eu faço com que os elementos fiquem sempre a esquerda */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f7fc;
}

/* O display flex vai fazer com que o container flex e list section fiquem lado a lado */
.container {
  display: flex;
  height: 100vh;
}

.form-section {
  width: 50%;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}
.list-section {
  width: 50%; /* Em telas grandes */
  padding: 20px;
  background-color: #eef2f9;
  overflow-y: auto;
  height: 100vh; /* Ocupa altura total em telas grandes */
}
/* com a largura de 50% o form e a lista de contatos vao ficar lado a lado na tela
.list-section {
  width: 50%;
  padding: 20px;
  background-color: #eef2f9;
  overflow-y: auto;
} */

h2 {
  color: #2c3e50;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #34495e;
}

/* class block criada apenas para dar um fundo cinza nos campos */
.block {
  background-color: #f9f9f9;
}

.required-field {
  color: red;
  margin-left: 5px;
}

/* Estilos para inputs */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"] {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
  width: 90%;
  outline: none;
  margin-bottom: 15px;
}

/* Colocando os botões de envio e reset no lugar */
.submit,
.cancel {
  display: inline-block;
  margin-right: 10px;
}

/* Estilizando os botões | Cursor pointer para fazer o botão ser clicável assim que o ponteiro do mouse atingir a margem dele */
.btn-submit,
.btn-reset {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #3498db;
  color: white;
}

/* Settando barra de busca */
.busca-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

#busca {
  flex: 1;
  padding: 0 10px;
  border: 1px solid #ccd1d9;
  border-radius: 4px 0 0 4px;
  background-color: #ffffff;
  height: 40px;
  box-sizing: border-box;
  font-size: 16px;
}

#lista-contatos {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

#lista-contatos li {
  background-color: #fff;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 5px;
  border-radius: 4px;
}

.contact-card {
  position: relative;
  background: #f4f8fc;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.contact-actions {
  position: absolute;
  top: 10px;
  right: 10px;
}

.contact-actions span {
  cursor: pointer;
  margin-left: 10px;
}
/* Responsividade */
@media screen and (max-width: 1023px) {
  .container {
    flex-direction: column;
  }
  .form-section,
  .list-section {
    width: 100%;
  }
}

@media screen and (max-width: 767px) {
  .container {
    padding: 10px;
    height: auto;
  }
  .form-section,
  .list-section {
    padding: 10px;
  }
}

.list-section {
  width: 50%; /* Em telas grandes */
  padding: 20px;
  background-color: #eef2f9;
  overflow-y: auto;
  height: 100vh; /* Ocupa altura total em telas grandes */
}

@media screen and (max-width: 1023px) {
  .container {
    flex-direction: column;
  }
  .form-section,
  .list-section {
    width: 100%;
    height: auto; /* Ajusta altura */
  }
  .list-section {
    max-height: 50vh; /* Limita altura para forçar scroll */
    overflow-y: auto;
  }
}
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 300px;
  border-radius: 5px;
  text-align: center;
}

.modal-content button {
  margin: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #3498db;
  color: white;
}

#modalCancelar {
  background-color: #e74c3c;
}
