/* =================== */
/* 🎨 VARIÁVEIS GERAIS */
/* =================== */
:root {
  --cor-fundo: #f4f6f8;
  --cor-principal: #007bff;
  --cor-secundaria: #6c757d;
  --texto: #333;
  --branco: #ffffff;
}

/* ======================= */
/* 🌍 ESTILOS GLOBAIS      */
/* ======================= */
* {
  transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cor-fundo);
  margin: 0;
  padding: 20px;
  color: var(--texto);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #3a3a3a;
}

h2 {
  margin-top: 2rem;
  color: var(--cor-principal);
}

/* ===================== */
/* 📦 CONTAINER PRINCIPAL */
/* ===================== */
.container {
  max-width: 800px;
  margin: 10px auto 0;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ======================= */
/* 📢 BANNER DE TOPO       */
/* ======================= */
.banner-topo {
  width: 100%;
  background-color: var(--cor-principal);
  color: white;
  text-align: center;
  padding: 10px 0;
  font-weight: bold;
  font-size: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}

.banner-topo p {
  margin: 0;
  padding: 2px;
  opacity: 1;
}

/* ============================= */
/* 📝 FORMULÁRIO DE MEDICAMENTO */
/* ============================= */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: bold;
}

input,
textarea,
button {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

button {
  background-color: var(--cor-principal);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #1c5fc4;
}

.dica-horario {
  color: #555;
  font-size: 0.9rem;
  margin: -8px 0 15px;
  display: block;
  box-shadow: 0 1px 0 var(--cor-principal);
}

/* ======================== */
/* 🟠 MODO DE EDIÇÃO ATIVO */
/* ======================== */
#status-edicao {
  display: none;
  color: #e67e22;
  font-weight: bold;
  font-size: 20px;
  text-align: center;
  
}

form.editando {
  color: black;
}

.modo-edicao {
  animation: pulseEdit 1s infinite alternate;
}

@keyframes pulseEdit {
  from {
    box-shadow: 0 0 0px transparent;
  }
  to {
    color: #e67e22;
    font-size: 16.2px;
  }
}

/* =========================== */
/* ✅ MENSAGEM DE SUCESSO     */
/* =========================== */
.mensagem-de-sucesso {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================= */
/* 📃 LISTA DE MEDICAMENTOS     */
/* ============================= */
#listaMedicamentos {
  margin-top: 20px;
  padding-left: 0;
  list-style: none;
}

.medicamento-item {
  position: relative;
  background: #f0f8ff;
  margin-bottom: 10px;
  padding: 12px;
  padding-right: 120px;
  border-radius: 6px;
  border-left: 5px solid var(--cor-principal);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  
  flex-wrap: wrap;
  flex-direction: column;
  align-items: flex-start;
}
.texto-observacao {
 
  max-width: 85%;
  text-wrap: wrap;
  color: #6d6c6c;
  font-style: italic;
  word-break: break-word;
  display: block;
  margin-top: 4px;
  align-items: flex-start;
}




/* =========================== */
/* 🔘 BOTÕES DE AÇÃO          */
/* =========================== */
.acoes {
position: absolute;
  top: 20px;
  right: 15px;
  flex-direction: column;
  width: auto;
  margin: 0;
}

.acoes button {
  padding: 11px 20px;
  background-color: #e0eefad3;
  border: 1px solid #000000;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-remover {
  color: red;
}

.btn-remover:hover {
  background-color: red;
  color: white;
}

.btn-editar {
  color: green;
}

.btn-editar:hover {
  background-color: green;
  color: white;
}

.btn-recomecar {
  color: #0077cc;
}

.btn-recomecar:hover {
  background-color: #0077cc;
  color: white;
}

/* ========================== */
/* 💊 AUTOCOMPLETE           */
/* ========================== */
.campo-autocomplete {
  position: relative;
}

#sugestoes {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 150px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 10;
}

.sugestao-item {
  padding: 8px 10px;
  cursor: pointer;
}

.sugestao-item:hover {
  background-color: #f0f0f0;
}

/* ======================= */
/* 🧾 LISTA DO HISTÓRICO   */
/* ======================= */
#listaHistorico {
  padding-left: 0;
  list-style: none;
}

#listaHistorico li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0px 2px 4px var(--cor-principal);
}

#listaHistorico .info-historico {
  flex: 1;
  font-size: 15px;
  line-height: 1.4;
}

.btn-remover-historico {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

/* =========================== */
/* 🔔 MODAL DE CONFIRMAÇÃO    */
/* =========================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-box {
  background: white;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 300px;
  width: 100%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.modal-botoes {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
}

.modal-botoes button {
  padding: 8px 16px;
  margin: 3px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#btnCancelarModal {
  background: #ccc;
}

#btnConfirmarModal {
  background: #e74c3c;
  color: white;
}

/* ========================= */
/* 🔊 CONTROLE DE ALARME    */
/* ========================= */
.controle-alarme {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f8f8f8;
  border: 2px solid #ccc;
  padding: 20px 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  z-index: 9999;
  display: none;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
}

.controle-alarme button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #ff5555;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.controle-alarme button:hover {
  background-color: #e60000;
}






/* ================================ */
/* 📱 TELAS PEQUENAS: 300px–500px  */
/* ================================ */
@media (max-width: 500px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  form {
    gap: 10px;
  }

  input,
  textarea,
  button {
    font-size: 14px;
    padding: 8px;
  }

  .btn-remover-historico,
  .acoes button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .controle-alarme {
    width: 90%;
    font-size: 1rem;
  }

  .modal-box {
    padding: 15px 20px;
  }

/* ===================== */
/* 📦 CONTAINER PRINCIPAL */
/* ===================== */
.container {
  max-width: 800px;
  margin: 30px auto 0;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

  
/* ======================= */
/* 📢 BANNER DE TOPO       */
/* ======================= */
.banner-topo {

  padding: 0px 0px;
  
}

.banner-topo p {
 
 
  margin: 0;
  padding: 8px;
  opacity: 1;
}
}



/* ============================= */
/* 📝 FORMULÁRIO DE MEDICAMENTO */
/* ============================= */

input,
textarea,
button {
  padding: 10px;
  font-size: 15px;
  width: 100%;
}
textarea {
  resize: vertical;
}

.dica-horario {
  margin: 0px 0 15px;
}



/* ============================= */
/* 📃 LISTA DE MEDICAMENTOS     */
/* ============================= */

.medicamento-item {
 padding-right: 0;
 
 flex-direction: column;
}


/* =========================== */
/* 🔘 BOTÕES DE AÇÃO          */
/* =========================== */
.acoes {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-left: 9px;
  margin-bottom: 18px;

}

.acoes button {
  width: 100%;

  
}



.btn-editar {
  color: green;
}

.btn-editar:hover {
  background-color: green;
  color: white;
}

.btn-recomecar {
  color: #0077cc;
}



/* ======================= */
/* 🧾 LISTA DO HISTÓRICO   */
/* ======================= */

#listaHistorico li {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}




/* ================================= */
/* 📱 TELAS MÉDIAS: 501px–700px     */
/* ================================= */





@media (min-width: 501px) and (max-width: 700px) {
    h1 {
    font-size: 1.6rem;
  }

  .container {
    padding: 1.5rem;
  }

  input,
  textarea,
  button {
    font-size: 15px;
  }

  .acoes button,
  .btn-remover-historico {
    font-size: 0.85rem;
    padding: 10px 16px;
  }

  /* ===================== */
/* 📦 CONTAINER PRINCIPAL */
/* ===================== */
.container {
  max-width: 800px;
  margin: 30px auto 0;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

  
/* ======================= */
/* 📢 BANNER DE TOPO       */
/* ======================= */
.banner-topo {

  padding: 0px 0px;
  
}

.banner-topo p {
 
 
  margin: 0;
  padding: 8px;
  opacity: 1;
}



/* ============================= */
/* 📝 FORMULÁRIO DE MEDICAMENTO */
/* ============================= */

input,
textarea,
button {
  padding: 10px;
  font-size: 15px;
  width: 100%;
}
textarea {
  resize: vertical;
}

.dica-horario {
  margin: 0px 0 15px;
}



/* ============================= */
/* 📃 LISTA DE MEDICAMENTOS     */
/* ============================= */

.medicamento-item {
 padding-right: 0;
 
 flex-direction: column;
}


/* =========================== */
/* 🔘 BOTÕES DE AÇÃO          */
/* =========================== */
.acoes {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-left: 9px;
  margin-bottom: 18px;

}

.acoes button {
  width: 100%;

  
}



.btn-editar {
  color: green;
}

.btn-editar:hover {
  background-color: green;
  color: white;
}

.btn-recomecar {
  color: #0077cc;
}



/* ======================= */
/* 🧾 LISTA DO HISTÓRICO   */
/* ======================= */

#listaHistorico li {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}


}









/* ================================= */
/* 💻 TELAS INTERMEDIÁRIAS: 701–1000px */ 
/* ================================= */
@media (min-width: 701px) {

  
  /* ===================== */
/* 📦 CONTAINER PRINCIPAL */
/* ===================== */
.container {
  max-width: 1000px;
  margin: 25px auto 0;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

  
/* ======================= */
/* 📢 BANNER DE TOPO       */
/* ======================= */
.banner-topo {

  padding: 5px 0px;
  
}
.banner-topo p {
  margin: 0;
  padding: 10px;
  opacity: 1;
}

/* ============================= */
/* 📝 FORMULÁRIO DE MEDICAMENTO */
/* ============================= */

input,
textarea,
button {
  padding: 13px;
  font-size: 18px;
  width: 100%;
}
.dica-horario {
  margin: 0px 0 18px;
}


label {
  font-weight: bold;
  font-size: 19px;
}
button {
  padding: 15px;
  font-size: 20px;
}


/* ============================= */
/* 📃 LISTA DE MEDICAMENTOS     */
/* ============================= */

.medicamento-item {
  font-size: 19px;
}


/* =========================== */
/* 🔘 BOTÕES DE AÇÃO          */
/* =========================== */
.acoes {
  position: absolute;
  top: 20px;
  right: 15px;
  flex-direction: column;
  width: auto;
  margin: 0;
  gap: 10px;
}

.acoes button {
  width: 100%;

}


/* ======================= */
/* 🧾 LISTA DO HISTÓRICO   */
/* ======================= */

#listaHistorico li {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-size: 23px;
  font-weight: 700;
}
.btn-remover-historico {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 10px;

  font-size: 15px;
 
}
}