/* --- MODAL BASE --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  padding: 20px;

  /* Oculto por defecto */
  display: none;

  /* Centrado flex cuando esté visible */
  align-items: center;
  justify-content: center;
}

/* Cuando está visible */
.modal.visible {
  display: flex;
}

/* Caja del modal */
.modal-content {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  width: 90%;
  max-width: 420px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  animation: modalFade 0.25s ease-out;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--color-border);
}


/* Animación suave */
@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botón cerrar */
.modal-cerrar {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  color: #333;
  font-size: 20px;
  border: none;
  cursor: pointer;
}

.modal-cerrar:hover {
  background: #c0392b;
}

/* Inputs dentro del modal */
.modal-content input {
  width: 100%;
  padding: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.modal-content input:focus {
  border-color: var(--color-button);
}


/* Botones dentro del modal */
.modal-content button {
  padding: 10px 14px;
  background: var(--color-button);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.modal-content button:hover {
  background: var(--color-button-hover);
}


/* Lista de rutas para borrar */
#modal-borrar .modal-content {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  width: 90%;
  max-width: 420px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--color-border);
}



#lista-borrar-rutas {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


#lista-borrar-rutas li {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


#lista-borrar-rutas li:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--color-button);
}
#lista-borrar-rutas li {
  animation: fadeInItem 0.25s ease-out;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

