/* General */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f3f3f3;
  margin: 0;
  padding: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 80%;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #535353;
  padding: 10px;
  color: white;
  border-radius: 5px;
  margin-bottom: 20px;
}

#habit-list {
  margin-top: 20px;
  background-color: #fff;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#habit-list input {
  padding: 5px;
  margin-right: 10px;
  width: 150px;
}

#habit-list button {
  padding: 5px;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}



#habits-container {
  list-style-type: none;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

#habits-container li {
  margin: 5px 0;
  padding: 5px 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#habits-container .editHabitBtn {
  background-color: transparent;
  border: 1px solid rgb(0, 0, 0);
  padding: 5px;
  color: white;
  cursor: pointer;
  width: fit-content;

}

#habits-container .removeHabitBtn {
  background-color: transparent;
  border: 1px solid red;
  padding: 5px;
  color: white;
  cursor: pointer;
  width: fit-content;
}

#habits-container .registerToday {
  background-color: transparent;
  border: 1px solid black;
  color: black;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  width: fit-content;

}

#calendar {
  margin-top: 20px;
  background-color: #fff;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#month-name {
  font-size: 18px;
  text-align: center;
  margin-bottom: 10px;
}

#days-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  grid-auto-rows: 30px;
  justify-items: center;
}

.day {
  color: transparent;
  width: 15px;
  height: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 12px;
}

.day.active {
  color: transparent;
}

#prev-month,
#next-month {
  padding: 5px;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
}

#prev-month:hover,
#next-month:hover {
  background-color: #45a049;
}

button {
  cursor: pointer;
}

.monthContainer {
  display: flex;
  flex-direction: column;
  width: fit-content;
  height: fit-content;
}

.habitYearName {
  display: block;
  width: 100%;
  font-size: 14px;
  text-align: center;
  margin: 10px 0;
}

.habitCalendarContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.addHabitBtn {
  border-radius: 5px;
  background: #535353;
}

/* Estilo para el contenedor de la lista de hábitos */
ul#habits-container {
  list-style-type: none;
  padding: 0;
}

.monthDaysContainer {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  max-height: 200px;
}

.daysContainer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 20px;
  padding: 10px;
}

.editInput {
  margin-right: 10px;
}

.habit-input {
  text-align: center;
  margin: 10px;
}

.habit-input-container {
  display: flex;
  flex-wrap: wrap;
  height: fit-content;
  gap: 10px;
  justify-content: center;
  margin: 10px 0;
  padding: 10px;
}

.habitBtnContainer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: fit-content;
}

.habitBtnContainer button {
  border-radius: 5px;
  width: 20px;
}

.habitText {
  display: flex;
  flex-direction: row;
  font-weight: 500;
  
}

.habitText button {
  border-radius: 5px;
  width: fit-content;
  margin: 0;
}

.habitName {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
  background-color: transparent;
}

footer {
  padding: 30px 20px;
  text-align: center;
  width: 100%;
}

footer a {
  color: black;
}

.downloadCsvBtn {
  margin-top: 10px;
}



#today h3 {
  font-size: 1em;
  font-weight: bold;
  color: #333;
}

#today ul {
  list-style-type: none;
  padding-left: 0;
}

#today ul li {
  font-size: 1em;
  color: #555;
}

#today p {
  font-size: 1em;
  color: #888;
}




.habitWrapper {
  border: 1px solid #c9c9c9;
  border-radius: 5px;
}

/* Estilos Responsive */

/* Pantallas grandes */
@media (max-width: 1200px) {
  #habits-container {
    grid-template-columns: 1fr 1fr;
    /* Cambia a 2 columnas */
  }

  .habitWrapper {
    flex-direction: row;
  }
}

/* Pantallas medianas */
@media (max-width: 768px) {
  .container {
    width: 90%;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  #habits-container {
    grid-template-columns: 1fr;
    /* Una sola columna */
  }

  .habitName {
    font-size: 14px;
  }

  .habitBtnContainer {
    gap: 10px;
  }
}

/* Pantallas pequeñas (Móviles) */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    width: 100%;
  }

  header {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  #habit-list input {
    width: 100%;
    margin: 5px 0;
  }

  #habit-list button {
    width: 100%;
  }

  #habits-container {
    grid-template-columns: 1fr;
    /* Una sola columna */
    padding: 0;
  }

  .habitBtnContainer {
    gap: 10px;
  }

  .habitName {
    font-size: 14px;
    text-align: left;
  }

  .habitCalendarContainer {
    margin-top: 10px;
  }
}

.saveEditBtn {
  background: #535353;
}