body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e5e5e9;
}
/* Estilos para el contenido */
.tab-content {
  display: none;
  padding: 20px;
  border: 1px solid #ccc;
  background-color: #fafafa;
}

.tab-content.active {
  display: block;
}
.container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px;
}

.header {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  gap: 10px;
}

h1 {
  font-size: 35px;
  font-weight: bold;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  /* margin-bottom: 20px; */
  margin: 0;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  
}

.buttons{
  display: flex;
  justify-content: center; /* Centra horizontalmente */
  gap: 10px; /* Espacio entre los botones */
  margin-bottom: 15px;
}

/*Inicio del boton de Añadir lista Manual*/
.btn-blue{
  background:#1AAB8A;
  color:#fff;
  border:none;
  position:relative;
  height:35px;
  font-size:1.3em;
  padding:0 1.5em;
  cursor:pointer;
  transition:800ms ease all;
  outline:none;
  margin-right: 10px;
}
.btn-blue:hover{
  background:#fff;
  color:#1AAB8A;
}
.btn-blue:before,.btn-blue:after{
  content:'';
  position:absolute;
  top:0;
  right:0;
  height:2px;
  width:0;
  background: #1AAB8A;
  transition:400ms ease all;
}
.btn-blue:after{
  right:inherit;
  top:inherit;
  left:0;
  bottom:0;
}
.btn-blue:hover:before,.btn-blue:hover:after{
  width:100%;
  transition:800ms ease all;
}
/*Fin del boton de Añadir lista Manual*/

/*Inicio de boton de GPT*/
.cht-gpt{
  background:#1AAB8A;
  color:#fff;
  border:none;
  position:relative;
  height:35px;
  font-size:1.3em;
  padding:0 1.5em;
  cursor:pointer;
  transition:800ms ease all;
  outline:none;
}
.cht-gpt:hover{
  background:#fff;
  color:#1AAB8A;
}
.cht-gpt:before,.cht-gpt:after{
  content:'';
  position:absolute;
  top:0;
  right:0;
  height:2px;
  width:0;
  background: #1AAB8A;
  transition:400ms ease all;
}
.cht-gpt:after{
  right:inherit;
  top:inherit;
  left:0;
  bottom:0;
}
.cht-gpt:hover:before,.cht-gpt:hover:after{
  width:100%;
  transition:800ms ease all;
}
/*Fin del boton GPT*/


/* Ajustar espaciados entre los elementos de entrada de tareas */
.task-input {
  gap: 10px;
  margin-bottom: 20px;
  justify-content: space-between;
  align-items: center;
}

.task-input input {
  width: 93%;
  padding: 10px;
  font-size: 16px;
  height: 42px; /* Asegurar que tenga la misma altura que los botones */
  margin-bottom: 10px;
  box-sizing: border-box; /* Asegura que el padding no afecte el tamaño total */
  border: 2px solid #ccc;
  border-radius: 8px;
}

.task-input div{
  display: inline-block;
}

.priority-group select {
  padding: 10px;
  width: 100px;
  height: 42px; /* Alineado con el alto del input de tareas y botones */
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 5px;
}

.task-input button {
  font-size: 16px;
  border: none;
  cursor: pointer;
  height: 42px; /* Igualar el alto al resto de los elementos */
  flex: 0 0 auto;
}

#add-task-btn {
  width: 15%;
  padding: 0 15px;
  background-color: #007bff;
  color: white;
  margin-left: 5px;
  flex: 0 0 auto;
  height: 42px; /* Igualar el alto al resto de los elementos */
  margin-bottom: 10px;
  border-radius: 5px;
}

#add-multiple-btn {
  width: 10%;
  padding: 0 15px;
  background-color: #28a745;
  color: white;
  margin-left: 1px;
  flex: 0 0 auto;
  height: 42px; /* Igualar el alto al resto de los elementos */
  margin-bottom: 10px;
  border-radius: 5px;
}

.task-input button:hover,
#add-multiple-btn:hover {
  background-color: #0056b3;
}

#add-multiple-btn:hover {
  background-color: #218838;
}

#task-list,
#completed-tasks {
  list-style-type: none;
  padding: 0;
}

#task-list li,
#completed-tasks li {
  background-color: #f8f8f8;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-start; /* Alinear el contenido a la izquierda */
  align-items: center;
  border-radius: 5px;
  position: relative;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease;
}

#task-list li:hover {
  background-color: #e0e0e0;
}

#task-list li .drag-handle {
  display: none;
  cursor: grab;
  margin-right: 10px;
  color: #888;
}

#task-list li:hover .drag-handle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 2px;
}

.drag-handle span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 1px;
  background-color: #888;
}

.checkbox {
  margin-right: 10px;
}

#completed-tasks li span {
  text-decoration: line-through;
  color: gray;
}

#task-list li.dragging {
  background-color: white;
  border: 2px solid #000;
  opacity: 1;
}

footer {
  margin-top: 20px;
  text-align: center;
}

footer button {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

footer button:hover {
  background-color: #218838;
}

/* Icono de eliminar (X) */
.delete-btn {
  display: none;
  cursor: pointer;
  color: red;
  font-size: 18px;
  margin-left: 10px;
  position: relative;
}

/* Mostrar tooltip de "Eliminar" cuando se pase el cursor */
.delete-btn::after {
  content: "Eliminar";
  display: none;
  position: absolute;
  top: -25px;
  left: -5px;
  background-color: #333;
  color: white;
  padding: 5px;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
}

.delete-btn:hover::after {
  display: block;
}

#task-list li:hover .delete-btn,
#completed-tasks li:hover .delete-btn {
  display: inline-block;
}

/* Eliminar el botón de "Editar" y activar edición con un clic */
.task-text {
  flex: 1;
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 5px;
}

.task-text:hover {
  background-color: #e0e0e0;
}

/* Ocultar el botón editar y usar el click en el texto de la tarea para editar */
.edit-btn {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  
}

/* .close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
} */

.modal-buttons {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

/* Toast para URL copiada */
.toast {
  visibility: hidden;
  min-width: 200px;
  background-color: #333;
  color: white;
  text-align: center;
  border-radius: 5px;
  padding: 10px;
  position: fixed;
  z-index: 999;
  left: 50%;
  top: 50%; /* Centrado cerca del botón compartir */
  transform: translate(-50%, -50%);
  font-size: 16px;
  opacity: 0; /* Agregar opacidad para hacer la transición */
  transition: opacity 0.5s ease-in-out; /* Transición para mostrar y ocultar el toast */
}

.toast.show {
  visibility: visible;
  opacity: 1; /* Mostrar el toast con opacidad completa */
}

#multiple-tasks-input {
  width: 100%;
  height: 100px;
}

@-webkit-keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/*  */

.input-container {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 5px;
}

.gpt-input {
  width: 70%; /* Ajusta el tamaño del input */
  padding: 10px;
  border-radius: 5px;
  font-style: italic;
}

.gpt-button {
  padding: 5px;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
}

.gpt-textarea {
  width: 100%;
  height: 200px;
  padding-left: 7px;
  margin-top: 10px;
  border-radius: 5px;
  font-style: italic;
}
#close-gpt {
  cursor: pointer;
}

/* header title */

.header-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Share btn */
.share-btn {
  background: #4caf50;
  border: none;
  padding: 10px;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .container {
    width: 100%;
    max-width: 85%;
    margin: 0 auto;
  }

  .header-title {
    flex-direction: column;
    gap: 15px;
  }
  .buttons{
    display: block; 
    justify-content: center;
  }
  .btn-blue{
    width: 100%;
    font-size: 1.3rem;
    display: block; 
    margin: 0 auto 10px;
  }
  .cht-gpt{
    width: 100%;
    font-size: 1.3rem;
    display: block; 
    margin: 0 auto;
  }
  .share-btn {
    width: 50%;
  }

  .task-input {
    flex-direction: column;
    width: 100%;
  }
  .task-input input {
    width: 101%;
  }
  .priority-group select {
    width: 270px;
    margin-bottom: 5%;
  }
  .priority-group select option{
    width: 7px;
  }
  #add-multiple-btn {
    margin-left: 0;
    width: 100%;
  }
  #add-task-btn{
    width: 100%;
    margin-left: 0px;
  }
}
